This commit is contained in:
மனோஜ்குமார் பழனிச்சாமி 2025-04-24 01:02:55 -07:00 committed by GitHub
commit 5671abe7b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -732,6 +732,8 @@ class OpenAIChatCompletion(BaseLLM, BaseOpenAILLM):
error_body = getattr(e, "body", None)
if error_headers is None and error_response:
error_headers = getattr(error_response, "headers", None)
if not error_text:
error_text = getattr(e, "message", str(e))
raise OpenAIError(
status_code=status_code,
message=error_text,