Class CoreRestErrorHandler
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
Core rest error handler.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringextractCoreErrorCode(String bodyResponse) Try to create a string from the error response with the only purpose to be logged.protected voidthrowBadRequestSpecificException(String errorMsg, String errorResponseBody) Throws the specific bad request exception from the error response.Methods inherited from class es.kukenan.smartfi.microservice.transfer.service.backoffice.TransferRestErrorHandler
extractErrorResponse, handleError, hasErrorMethods 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
-
CoreRestErrorHandler
public CoreRestErrorHandler()
-
-
Method Details
-
throwBadRequestSpecificException
Description copied from class:TransferRestErrorHandlerThrows the specific bad request exception from the error response.- Overrides:
throwBadRequestSpecificExceptionin classTransferRestErrorHandler- Parameters:
errorMsg- error message.errorResponseBody- error response body.
-
extractCoreErrorCode
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.
-