Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
eddumelendez committed Sep 20, 2023
1 parent 6863ced commit 6f4475e
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
import org.springframework.http.HttpStatusCode;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.DefaultResponseErrorHandler;
Expand Down Expand Up @@ -34,12 +33,6 @@ protected void prepareConnection(HttpURLConnection connection, String httpMethod

static class ServerResponseErrorHandler extends DefaultResponseErrorHandler {

@Override
protected boolean hasError(int unknownStatusCode) {
HttpStatus.Series series = HttpStatus.Series.resolve(unknownStatusCode);
return series == HttpStatus.Series.SERVER_ERROR;
}

@Override
protected boolean hasError(HttpStatusCode statusCode) {
return statusCode.is5xxServerError();
Expand Down

0 comments on commit 6f4475e

Please sign in to comment.