java.lang.Object
es.kukenan.smartfi.microservice.transfer.service.backoffice.TransferRestErrorHandler
es.kukenan.smartfi.microservice.transfer.service.backoffice.CoreRestErrorHandler
All Implemented Interfaces:
org.springframework.web.client.ResponseErrorHandler

public class CoreRestErrorHandler extends TransferRestErrorHandler
Core rest error handler.
  • Constructor Details

    • CoreRestErrorHandler

      public CoreRestErrorHandler()
  • Method Details

    • throwBadRequestSpecificException

      protected void throwBadRequestSpecificException(String errorMsg, String errorResponseBody)
      Description copied from class: TransferRestErrorHandler
      Throws the specific bad request exception from the error response.
      Overrides:
      throwBadRequestSpecificException in class TransferRestErrorHandler
      Parameters:
      errorMsg - error message.
      errorResponseBody - error response body.
    • extractCoreErrorCode

      private String extractCoreErrorCode(String bodyResponse)
      Try to create a string from the error response with the only purpose to be logged.
      Parameters:
      bodyResponse - ClientHttpResponse.
      Returns:
      a string from the error response.