Skip to content
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

fix(errors): properly assign APIError.body #949

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

cenhao
Copy link
Contributor

@cenhao cenhao commented Dec 7, 2023

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Simply assign the body from the parameter to the class variable.

Based on the comment in the code:

    ""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`.
    """

Additional context & links

closes #948

@cenhao cenhao requested a review from a team as a code owner December 7, 2023 23:38
@cenhao cenhao mentioned this pull request Dec 7, 2023
1 task
@RobertCraigie RobertCraigie changed the title Assign body in APIError fix(errors): properly assign APIError.body Dec 8, 2023
@RobertCraigie RobertCraigie changed the base branch from main to next December 8, 2023 09:55
@RobertCraigie
Copy link
Collaborator

Sorry about the bug and thanks very much for opening a PR!

@RobertCraigie RobertCraigie merged commit c70e194 into openai:next Dec 8, 2023
1 check passed
@stainless-bot stainless-bot mentioned this pull request Dec 8, 2023
stainless-bot pushed a commit that referenced this pull request Dec 9, 2023
Co-authored-by: Hao Cen <hao_cen@Haos-MacBook-Pro.local>
megamanics pushed a commit to devops-testbed/openai-python that referenced this pull request Aug 14, 2024
Co-authored-by: Hao Cen <hao_cen@Haos-MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

body in APIError is never assigned
2 participants