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

Catch HTTP 411 link error #348

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Catch HTTP 411 link error #348

wants to merge 1 commit into from

Conversation

rubdos
Copy link
Member

@rubdos rubdos commented Dec 18, 2024

@@ -68,6 +68,27 @@ where
})?;
Err(ServiceError::ProofRequiredError(proof_required))
},
StatusCode::LENGTH_REQUIRED => {
#[derive(Debug, serde::Deserialize)]
struct LinkedDeviceNumberError {
Copy link
Collaborator

Choose a reason for hiding this comment

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

the problem of doing this is that if any other endpoint gets 411 we'll deserialize the response to this type, this has happened with CONFLICT before. I wonder what we could do that works better? maybe infer the possible custom error type with a template parameter?

Copy link
Member Author

Choose a reason for hiding this comment

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

I wonder what we could do that works better?

I'd just add a retry-chain, no? Or should we add some context information to the service_error_for_status function?

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