Closed
Description
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 APIError
class, there is a body
class variable. Based on the comment:
""The API response body.
If the API responded with a valid JSON structure then this property will be the
decoded result.
If it isn't a valid JSON structure then this will be the raw response.
If there was no response associated with this error then it will be `None`.
"""
This class variable should contain the body of the response. However in the __init__
function, the body
variable is not assigned and kept.
To Reproduce
Simply error.body
will result in:
AttributeError: 'XxxxxxError' object has no attribute 'body'
Code snippets
No response
OS
OS agnostic
Python version
Python version agnostic
Library version
Lib version agnostic