-
Notifications
You must be signed in to change notification settings - Fork 38.5k
DefaultResponseErrorHandler does not handle status values outside of HttpStatus enum [SPR-17461] #21993
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
Comments
Juergen Hoeller commented Are you possibly referring to the same problem as #21971? We intend to revisit this for 5.1.3. |
Liam Bryan commented Juergen Hoeller: Ah, I did a search for Officially 'no' since that's for custom error codes; however I'm more than happy for this to be addressed there. Are there further updates for Spring 4 planned? If so there's a bigger issue there which I highlight here, where using the |
Juergen Hoeller commented As for the problem with the response body getting swallowed, this should be fixed in 4.3.15+ (#21145). In general, those It's not clear to me why the status code 299 would throw an exception in the latest versions. The |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
Liam Bryan opened SPR-17461 and commented
The
DefaultResponseErrorHandler
does not handleHttpStatus
values not specified in the enumvalues
. For example; a service we call returns299
which reports as an error in the latest spring versions (linked code).In previous versions (checked 4.3.14 as used in current project), this wasn't reported as an error; however the thrown
UnknownHttpStatusCodeException
(which is caught, and converted tofalse
for there being an error) contained theresponseBody
as one of its arguments, which in turn closed theInputStream
or theresponse
meaning that the body of the response could not be parsed to aResponseEntity
anywhere.At present, this is being gotten around with a custom class:
Affects: 4.3.14, 5.1.2
Reference URL:
spring-framework/spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java
Line 52 in c2b55e6
Issue Links:
The text was updated successfully, but these errors were encountered: