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 Details

    • NoopResponseErrorHandler

      public NoopResponseErrorHandler()
  • Method Details

    • hasError

      public boolean hasError(org.springframework.http.client.ClientHttpResponse response) throws IOException
      Specified by:
      hasError in interface org.springframework.web.client.ResponseErrorHandler
      Throws:
      IOException
    • handleError

      public void handleError(org.springframework.http.client.ClientHttpResponse response) throws IOException
      Specified by:
      handleError in interface org.springframework.web.client.ResponseErrorHandler
      Throws:
      IOException