RestTemplate does not throw exception for custom error codes [SPR-17439] #21971
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: regression
A bug that is also a regression
Milestone
shollander opened SPR-17439 and commented
Normally,
RestTemplate
is expected to throw an exception if the server returns an HTTP error code. However, is the server returns a custom error code (4xx or 5xx), no exception is thrown and the call returns normally.Affects: 4.3.20, 5.0.10
Issue Links:
Referenced from: commits 97ac1c2, 4a51acb, 1c1b942, 738097d
Backported to: 5.0.11, 4.3.21
The text was updated successfully, but these errors were encountered: