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

Common error type for client services #92

Merged
merged 2 commits into from
Jul 8, 2024
Merged

Conversation

alexrudy
Copy link
Owner

@alexrudy alexrudy commented Jul 8, 2024

Converts client services to always return a concrete, common error type.

The default tower services use Box<Error> as the error type, but this is not
necessary or optimal in this case, so there are some forked versions of those
tower services added to crate::service.

alexrudy added 2 commits July 8, 2024 16:27
Client pool::Error (for errors returned from checkouts) should implement Display via the thiserror::Error macro
Replaced the `tower` optional layer with our own that supports unifying error types, and a custom timeout layer that allows constructing an error type. The `tower::timeout` layer retunrs a box error always.
@alexrudy alexrudy merged commit 47c55b0 into main Jul 8, 2024
11 checks passed
@alexrudy alexrudy deleted the client/common-error-type branch July 9, 2024 05:58
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.

1 participant