Class UnauthorizedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.example.blogs.app.api.auth.exception.UnauthorizedException
All Implemented Interfaces:
Serializable

public class UnauthorizedException extends RuntimeException
Thrown when a request fails authorization due to invalid, expired, or missing authentication credentials. This exception is mapped to HTTP 401 Unauthorized status.
See Also:
  • Constructor Details

    • UnauthorizedException

      public UnauthorizedException(Exception cause)
      Constructs a new UnauthorizedException with a default message.
      Parameters:
      cause - the underlying cause of the exception