Package com.brihaspathee.zeus.exception
Class SecurityErrorHandler
java.lang.Object
com.brihaspathee.zeus.exception.SecurityErrorHandler
Created in Intellij IDEA
User: Balaji Varadharajan
Date: 10, August 2022
Time: 2:25 PM
Project: Zeus
Package Name: com.brihaspathee.zeus.exception
To change this template use File | Settings | File and Code Template
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<com.brihaspathee.zeus.web.response.ZeusApiResponse<com.brihaspathee.zeus.exception.ApiExceptionList>>Handles authority not found exception This exception is generated when the authority that the user is searching is not foundorg.springframework.http.ResponseEntity<com.brihaspathee.zeus.web.response.ZeusApiResponse<com.brihaspathee.zeus.exception.ApiExceptionList>>handleRoleNotFoundException(RoleNotFoundException exception) Handles role not found exception This exception is generated when the role that the user is searching is not foundorg.springframework.http.ResponseEntity<com.brihaspathee.zeus.web.response.ZeusApiResponse<com.brihaspathee.zeus.exception.ApiExceptionList>>handleUserNotFoundException(UserNotFoundException exception) Handles user not found exception This exception is generated when the username is not found
-
Constructor Details
-
SecurityErrorHandler
public SecurityErrorHandler()
-
-
Method Details
-
handleUserNotFoundException
@ExceptionHandler(UserNotFoundException.class) public org.springframework.http.ResponseEntity<com.brihaspathee.zeus.web.response.ZeusApiResponse<com.brihaspathee.zeus.exception.ApiExceptionList>> handleUserNotFoundException(UserNotFoundException exception) throws com.fasterxml.jackson.core.JsonProcessingException Handles user not found exception This exception is generated when the username is not found- Parameters:
exception-- Returns:
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
handleRoleNotFoundException
@ExceptionHandler(RoleNotFoundException.class) public org.springframework.http.ResponseEntity<com.brihaspathee.zeus.web.response.ZeusApiResponse<com.brihaspathee.zeus.exception.ApiExceptionList>> handleRoleNotFoundException(RoleNotFoundException exception) Handles role not found exception This exception is generated when the role that the user is searching is not found- Parameters:
exception-- Returns:
-
handleAuthorityNotFoundException
@ExceptionHandler(AuthorityNotFoundException.class) public org.springframework.http.ResponseEntity<com.brihaspathee.zeus.web.response.ZeusApiResponse<com.brihaspathee.zeus.exception.ApiExceptionList>> handleAuthorityNotFoundException(AuthorityNotFoundException exception) Handles authority not found exception This exception is generated when the authority that the user is searching is not found- Parameters:
exception-- Returns:
-