Class ErrorHttpClientPermissionErrorExceptionConverter
java.lang.Object
com.totvs.tjf.api.response.error.converter.ErrorExceptionConverter
com.totvs.tjf.api.response.error.converter.ErrorHttpClientPermissionErrorExceptionConverter
HttpClientPermissionErrorException and ApiError converter to
ApiErrorResponseDetail.- Author:
- Marcos Paulo dos Santos
-
Nested Class Summary
Nested classes/interfaces inherited from class com.totvs.tjf.api.response.error.converter.ErrorExceptionConverter
ErrorExceptionConverter.ExceptionErrorMap -
Field Summary
Fields inherited from class com.totvs.tjf.api.response.error.converter.ErrorExceptionConverter
API_ERROR_NULL_ERROR_MESSAGE, EXCEPTION_NULL_ERROR_MESSAGE -
Constructor Summary
ConstructorsConstructorDescriptionErrorHttpClientPermissionErrorExceptionConverter(com.totvs.tjf.core.i18n.I18nService i18nService) -
Method Summary
Modifier and TypeMethodDescriptionconvert(com.totvs.tjf.core.security.exception.HttpClientPermissionErrorException exception) Converts the givenHttpClientPermissionErrorExceptionto anErrorExceptionConverter.ExceptionErrorMapcontaining theHttpStatusand theApiErrorResponsewith: HttpStatus:HttpStatusCodeException.getStatusCode(); ApiErrorMessage: Code:Enum.name(); Message:HttpStatus.getReasonPhrase(); and Detailed message:Throwable.getLocalizedMessage().Methods inherited from class com.totvs.tjf.api.response.error.converter.ErrorExceptionConverter
convert, convertAsError, convertAsError, convertAsGeneric
-
Constructor Details
-
ErrorHttpClientPermissionErrorExceptionConverter
public ErrorHttpClientPermissionErrorExceptionConverter(com.totvs.tjf.core.i18n.I18nService i18nService)
-
-
Method Details
-
convert
public ErrorExceptionConverter.ExceptionErrorMap convert(com.totvs.tjf.core.security.exception.HttpClientPermissionErrorException exception) Converts the givenHttpClientPermissionErrorExceptionto anErrorExceptionConverter.ExceptionErrorMapcontaining theHttpStatusand theApiErrorResponsewith:- HttpStatus:
HttpStatusCodeException.getStatusCode(); - ApiErrorMessage:
- Code:
Enum.name(); - Message:
HttpStatus.getReasonPhrase(); and - Detailed message:
Throwable.getLocalizedMessage().
- Code:
- Parameters:
exception- exception to be converted- Returns:
- instance of
ErrorExceptionConverter.ExceptionErrorMap - Throws:
NullPointerException- if the given exception is null
- HttpStatus:
-