Class GlobalExceptionHandler
java.lang.Object
com.greenloop.auth_service.exception.GlobalExceptionHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<ApiResponse> org.springframework.http.ResponseEntity<ApiResponse> org.springframework.http.ResponseEntity<ApiResponse> org.springframework.http.ResponseEntity<ApiResponse> org.springframework.http.ResponseEntity<ApiResponse> org.springframework.http.ResponseEntity<ApiResponse> org.springframework.http.ResponseEntity<ApiResponse>
-
Constructor Details
-
GlobalExceptionHandler
public GlobalExceptionHandler()
-
-
Method Details
-
handleEmailAlreadyExists
@ExceptionHandler(EmailAlreadyExistsException.class) public org.springframework.http.ResponseEntity<ApiResponse> handleEmailAlreadyExists(EmailAlreadyExistsException ex) -
handleAuthenticationExceptions
@ExceptionHandler({InvalidCredentialsException.class,org.springframework.security.core.AuthenticationException.class}) public org.springframework.http.ResponseEntity<ApiResponse> handleAuthenticationExceptions(Exception ex) -
handleResourceNotFoundException
@ExceptionHandler(ResourceNotFoundException.class) public org.springframework.http.ResponseEntity<ApiResponse> handleResourceNotFoundException(ResourceNotFoundException ex) -
handleUserAlreadyVerifiedException
@ExceptionHandler(UserAlreadyVerifiedException.class) public org.springframework.http.ResponseEntity<ApiResponse> handleUserAlreadyVerifiedException(UserAlreadyVerifiedException ex) -
handleIncompleteVerification
@ExceptionHandler(VerificationNotCompleteException.class) public org.springframework.http.ResponseEntity<ApiResponse> handleIncompleteVerification(VerificationNotCompleteException ex) -
handleOTPValidationException
@ExceptionHandler(OtpValidationException.class) public org.springframework.http.ResponseEntity<ApiResponse> handleOTPValidationException(OtpValidationException ex) -
handleGenericException
@ExceptionHandler(java.lang.Exception.class) public org.springframework.http.ResponseEntity<ApiResponse> handleGenericException(Exception ex)
-