-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix deserialization of structured errors after retries are exhausted #630
Conversation
Generate changelog in
|
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.
Great find!
👨🎨 |
Released 1.11.2 |
@@ -0,0 +1,6 @@ | |||
type: fix | |||
fix: | |||
description: Structured errors are now correctly deserialized when requests exhaust |
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.
For what it's worth I think this was only a bug for 503 and 429 responses where our infrastructure sends empty response bodies.
Before this PR
All versions of dialogue contain this bug: when we exhaust retries and pass the final response to the ErrorDecoder, the response body has already been closed so it can't read the json. This means every structured error comes out as an
UnknownRemoteException
:This is obviously different from c-j-r's behaviour, and means anyone's
catch(RemoteException)
blocks won't get triggered.After this PR
==COMMIT_MSG==
Structured errors are now correctly deserialized when requests exhaust all available retries. (Previously they would always appear as an
UnknownRemoteException
.)==COMMIT_MSG==
Possible downsides?