diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/auth/OAuth2AuthorizationContextHolder.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/auth/OAuth2AuthorizationContextHolder.java index 7681a5fc..45285c8a 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/auth/OAuth2AuthorizationContextHolder.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/auth/OAuth2AuthorizationContextHolder.java @@ -292,13 +292,8 @@ public class OAuth2AuthorizationContextHolder implements AuthorizationContextHol @Override public boolean hasError(final ClientHttpResponse response) throws IOException { - final boolean hasError = super.hasError(response); - if (hasError) { - return hasError; - } - final HttpStatus statusCode = HttpStatus.resolve(response.getRawStatusCode()); - return (statusCode != null && statusCode.series() == HttpStatus.Series.SERVER_ERROR); + return (statusCode != null && statusCode.series().equals(HttpStatus.Series.SERVER_ERROR)); } }