@RestControllerAdvice
public class IdAuthExceptionHandler
extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
ResponseEntityExceptionHandler and any other Exceptions occurs and
returns custom exception response AuthResponseDTO.| Constructor and Description |
|---|
IdAuthExceptionHandler()
Instantiates a new id auth exception handler.
|
| Modifier and Type | Method and Description |
|---|---|
static Object |
buildExceptionResponse(Exception ex,
javax.servlet.http.HttpServletRequest request)
Constructs exception response body for all exceptions.
|
protected org.springframework.http.ResponseEntity<Object> |
handleAllExceptions(Exception ex,
org.springframework.web.context.request.WebRequest request)
Handle all exceptions.
|
protected org.springframework.http.ResponseEntity<Object> |
handleExceptionInternal(Exception ex,
Object errorMessage,
org.springframework.http.HttpHeaders headers,
org.springframework.http.HttpStatus status,
org.springframework.web.context.request.WebRequest request)
Method to handle all exception and return as customized response object.
|
protected org.springframework.http.ResponseEntity<Object> |
handleIdAppException(IdAuthenticationBaseException ex,
org.springframework.web.context.request.WebRequest request)
Method to handle and customize the response.
|
handleAsyncRequestTimeoutException, handleBindException, handleConversionNotSupported, handleException, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMethodArgumentNotValid, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleServletRequestBindingException, handleTypeMismatchpublic IdAuthExceptionHandler()
@ExceptionHandler(value=java.lang.Exception.class) protected org.springframework.http.ResponseEntity<Object> handleAllExceptions(Exception ex, org.springframework.web.context.request.WebRequest request)
ex - the exrequest - the requestprotected org.springframework.http.ResponseEntity<Object> handleExceptionInternal(Exception ex, @Nullable Object errorMessage, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request)
handleExceptionInternal in class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandlerex - ExceptionerrorMessage - List of error messagesheaders - Http headersstatus - Http statusrequest - Web requestResponseEntityExceptionHandler.handleExceptionInternal(java.lang.Exception,
java.lang.Object, org.springframework.http.HttpHeaders,
org.springframework.http.HttpStatus,
org.springframework.web.context.request.WebRequest)@ExceptionHandler(value=io.mosip.authentication.core.exception.IdAuthenticationAppException.class) protected org.springframework.http.ResponseEntity<Object> handleIdAppException(IdAuthenticationBaseException ex, org.springframework.web.context.request.WebRequest request)
ex - Exceptionrequest - Web requestCopyright © 2020. All rights reserved.