forked from loafle/openapi-generator-original
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