Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Made ApiError r#type optional to support Azure Error responses #95

Merged

Conversation

ChristopherJMiller
Copy link
Contributor

@ChristopherJMiller ChristopherJMiller commented Aug 8, 2023

Made ApiError::r#type an optional string to support the mismatch between Azure and OpenAI's specification. This will at least let Azure users view the actual error instead of receiving JSON Deserialization errors.

Discussed in #94

@64bit
Copy link
Owner

64bit commented Aug 8, 2023

Thank you @ChristopherJMiller for the PR.

Based purely on spec it seems message would also need to be Optional?

But if this works without making message optional, we can ship this.

@ChristopherJMiller
Copy link
Contributor Author

In local testing with my azure resource I'm now getting the full ApiError error results instead of JSONDeserialize error results, I think we're good to go! 😃

I'll keep an eye out if I encounter message also being not sent and report back

Copy link
Owner

@64bit 64bit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for confirming!

@64bit 64bit merged commit 4573e31 into 64bit:main Aug 8, 2023
@64bit
Copy link
Owner

64bit commented Aug 8, 2023

This is released in v0.13.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants