You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Responses API error handling reads error.message, but spec says message is top-level #2487
Confirm this is an issue with the Python library and not an underlying OpenAI API
This is an issue with the Python library
Describe the bug
In the Responses API event handling logic, the SDK reads the error message from error.message. However, according to the official documentation, the message field is at the top level of the error object, not nested inside another error field.
Proposed fix: Change the error handling logic to read data["message"] (the top-level field) and data["error"]["message"] (for backward compatibility) instead of only data["error"]["message"].
Activity
fix: handle top-level message in Responses API errors (openai#2487)
Improve streaming error handling and robustness
fix: handle top-level error fields in streaming responses (fixes open…