Class TokenExpiredException

  • All Implemented Interfaces:
    Serializable

    public class TokenExpiredException
    extends RocketRestException
    Exception thrown when an API request fails due to token expiration.

    This exception is thrown when a request receives a 401 Unauthorized response, indicating that the authentication token has expired or is invalid. The retry mechanism in AbstractApiClient catches this exception and attempts to refresh the token before retrying.

    Exception Hierarchy

     RuntimeException
       └── RocketRestException
             └── TokenExpiredException
     
    Since:
    1.0.0
    Author:
    guinetik <guinetik@gmail.com>
    See Also:
    RocketRestException, AuthStrategy, Serialized Form
    • Constructor Detail

      • TokenExpiredException

        public TokenExpiredException​(String message)
        Creates a new TokenExpiredException with the specified message.
        Parameters:
        message - The exception message
      • TokenExpiredException

        public TokenExpiredException​(String message,
                                     Throwable cause)
        Creates a new TokenExpiredException with the specified message and cause.
        Parameters:
        message - The exception message
        cause - The underlying cause