Auth Exceptions

The Auth namespace contains these exception classes.

All exception classes support built-in methods for returning the error message and exception type. See Exception Class and Built-In Exceptions.

The Auth namespace contains the following exception.

Exception Description Methods
Auth.​ConnectedAppPlugin​Exception Throw this exception to indicate that an error occurred while running the custom behavior for a connected app. To get the error message and write it to debug log, use the String getMessage().
Auth.JWTBearerTokenExchange.​JWTBearerTokenExchangeException​ Throw this exception to indicate a problem with the response from the token endpoint in the JWTBearerTokenExchange class. This exception occurs when the HTTP response during the OAuth 2.0 JWT bearer token flow:
  • Fails to return an access token.
  • Is not in JSON format.
  • Returns a response code other than a 200 “OK” success code.
To get the error message and write it to debug log, use the String getMessage().