Skip to content

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

Merged
RobertCraigie merged 1 commit intoopenai:nextfrom
cenhao:cenhao/assign-body-in-apierror
Dec 8, 2023
Merged

fix(errors): properly assign APIError.body#949
RobertCraigie merged 1 commit intoopenai:nextfrom
cenhao:cenhao/assign-body-in-apierror

Conversation

@cenhao
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

@RobertCraigie RobertCraigie merged commit c70e194 into openai:next Dec 8, 2023
@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>
cgayapr pushed a commit to cgayapr/openai-python that referenced this pull request Dec 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