-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat(client): Add timeout and connect error to backoff transient error #1014
feat(client): Add timeout and connect error to backoff transient error #1014
Conversation
@ptondereau thanks for working on this. We're in the midst of some work on federation at the moment so I don't have time to review this right this moment but rest assured I will not forget! Thanks for your patience. |
@@ -166,6 +197,22 @@ fn handle_graphql_body_errors(errors: Vec<GraphQLError>) -> Result<(), RoverClie | |||
} | |||
} | |||
|
|||
/// Downcasts the given err source into T. | |||
fn get_source_error_type<T: std::error::Error + 'static>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this hack because waiting for hyperium/hyper#2711
👷 Deploy request for apollo-cli-docs pending review.Visit the deploys page to approve it
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ptondereau thanks so much for your patience on this. This looks great! We'll get it in for the next release
#790
I think I could make it, but I don't know how to test with httpmock a connect error.
I turned 400's errors into a transient error, but I could revert this, if you want.
Configuration with CLI argument should be done in another PR.
Inspiration: https://github.com/TrueLayer/reqwest-middleware/blob/main/reqwest-retry/src/retryable.rs