Class SecurityErrorHandler

java.lang.Object
com.brihaspathee.zeus.exception.SecurityErrorHandler

@ControllerAdvice public class SecurityErrorHandler extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.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 found
    org.springframework.http.ResponseEntity<com.brihaspathee.zeus.web.response.ZeusApiResponse<com.brihaspathee.zeus.exception.ApiExceptionList>>
    Handles role not found exception This exception is generated when the role that the user is searching is not found
    org.springframework.http.ResponseEntity<com.brihaspathee.zeus.web.response.ZeusApiResponse<com.brihaspathee.zeus.exception.ApiExceptionList>>
    Handles user not found exception This exception is generated when the username is not found

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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: