Package org.bremersee.exception
Class RestApiResponseErrorHandler
java.lang.Object
org.bremersee.exception.RestApiResponseErrorHandler
- All Implemented Interfaces:
org.springframework.web.client.ResponseErrorHandler
public class RestApiResponseErrorHandler
extends Object
implements org.springframework.web.client.ResponseErrorHandler
The rest api response error handler.
- Author:
- Christian Bremer
-
Constructor Summary
ConstructorDescriptionInstantiates a new rest api response error handler.RestApiResponseErrorHandler
(RestApiExceptionParser restApiExceptionParser) Instantiates a new rest api response error handler. -
Method Summary
Modifier and TypeMethodDescriptionvoid
handleError
(org.springframework.http.client.ClientHttpResponse response) boolean
hasError
(org.springframework.http.client.ClientHttpResponse response) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.web.client.ResponseErrorHandler
handleError
-
Constructor Details
-
RestApiResponseErrorHandler
public RestApiResponseErrorHandler()Instantiates a new rest api response error handler. -
RestApiResponseErrorHandler
Instantiates a new rest api response error handler.- Parameters:
restApiExceptionParser
- the rest api exception parser
-
-
Method Details
-
hasError
public boolean hasError(@NonNull org.springframework.http.client.ClientHttpResponse response) throws IOException - Specified by:
hasError
in interfaceorg.springframework.web.client.ResponseErrorHandler
- Throws:
IOException
-
handleError
public void handleError(@NonNull org.springframework.http.client.ClientHttpResponse response) throws IOException - Specified by:
handleError
in interfaceorg.springframework.web.client.ResponseErrorHandler
- Throws:
IOException
-