-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get response data when the status is not in 200-300 #54
Comments
👋 Hi @noobnooc There is not a way to retrieve the body of the failed response with the way the library currently operates. I have filed your request to add support for it as sc-192056. I will check with the team today about whether or not this is something we can support and when we might have a timeline for completion. I will keep you updated as I know more. Thanks! |
I'm in the same boat, and having access to the error response would be very helpful. |
And to be clear: The error response would only need to be available in the |
I used this package to access the OpenAI API. However, when the response has a status code outside of the range 200-300, an error occurs. The
UnsuccessfulResponseError
object only includes aresponseStatus
field, but OpenAI responded with a JSON error message like the following:I would like to retrieve the message from this error response, but I couldn't find a way to do it. Is it possible to do so with the current version? If not, could you please add this functionality in a future release?
The text was updated successfully, but these errors were encountered: