Skip to content

task: Add serialize impl for ApiError #393

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

Merged
merged 3 commits into from
Jun 29, 2025

Conversation

tomharmon
Copy link
Contributor

Hi! thanks for the great ilbrary! I would love to see if you'd be open to adding a Serialize impl to the ApiError type so it can round trip.

I also bumped the Cargo.toml version so a new crate version could be published, if you are able to do that after merging that would be awesome.

The diff in async-openai/src/lib.rs was from running cargo fmt

- Adds the `serde::Serialize` derive macro to the `ApiError` type so
  that this error can be passed along the wire to clients for proxies
@tomharmon tomharmon force-pushed the task/add-serialize-for-api-error branch from 86d7fb6 to 0a9e131 Compare June 27, 2025 16:53
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.

Glad to hear you found it useful! and thank you for the PR!

Version bump is not required in PR - because that's taken care of by cargo release - also there are changes in main that calls for a minor version bump instead of patch version bump.

@64bit 64bit merged commit 4b52f20 into 64bit:main Jun 29, 2025
ifsheldon pushed a commit to ifsheldon/async-openai-wasm that referenced this pull request Jun 29, 2025
* task: Add serialize impl for ApiError

- Adds the `serde::Serialize` derive macro to the `ApiError` type so
  that this error can be passed along the wire to clients for proxies

* Update async-openai/Cargo.toml

* Update async-openai/Cargo.toml

---------

Co-authored-by: Himanshu Neema <[email protected]>
(cherry picked from commit 4b52f20)
jkoppel pushed a commit to up-to-speed/async-openai that referenced this pull request Jul 8, 2025
* task: Add serialize impl for ApiError

- Adds the `serde::Serialize` derive macro to the `ApiError` type so
  that this error can be passed along the wire to clients for proxies

* Update async-openai/Cargo.toml

* Update async-openai/Cargo.toml

---------

Co-authored-by: Himanshu Neema <[email protected]>
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.

2 participants