Class NoopResponseErrorHandler
java.lang.Object
com.helixframework.resttemplate.errorhandler.NoopResponseErrorHandler
- All Implemented Interfaces:
org.springframework.web.client.ResponseErrorHandler
public class NoopResponseErrorHandler
extends Object
implements org.springframework.web.client.ResponseErrorHandler
RestTemplate error handler that suppresses the default error handler which throws exceptions when 4xx and 5xx series
status codes are returned.
This error handler prevents RestTemplate from throwing exceptions in the event of 4xx and 5xx series status codes and returns the response allowing the caller to determine how best to handle the error.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleError(org.springframework.http.client.ClientHttpResponse response) booleanhasError(org.springframework.http.client.ClientHttpResponse response) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.client.ResponseErrorHandler
handleError
-
Constructor Details
-
NoopResponseErrorHandler
public NoopResponseErrorHandler()
-
-
Method Details
-
hasError
public boolean hasError(org.springframework.http.client.ClientHttpResponse response) throws IOException - Specified by:
hasErrorin interfaceorg.springframework.web.client.ResponseErrorHandler- Throws:
IOException
-
handleError
public void handleError(org.springframework.http.client.ClientHttpResponse response) throws IOException - Specified by:
handleErrorin interfaceorg.springframework.web.client.ResponseErrorHandler- Throws:
IOException
-