mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-17 00:21:19 +00:00
Fix for handling error in resttemplate (#17381)
* Fix with handling error * Fix with handling error
This commit is contained in:
@@ -700,6 +700,10 @@ public class ApiClient extends JavaTimeFormatter {
|
||||
}
|
||||
}
|
||||
|
||||
if (responseEntity == null) {
|
||||
throw new RestClientException("API returned HttpServerErrorException");
|
||||
}
|
||||
|
||||
if (responseEntity.getStatusCode().is2xxSuccessful()) {
|
||||
return responseEntity;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user