Class AtlanException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.atlan.exception.AtlanException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ApiConnectionException, ApiException, AuthenticationException, ConflictException, InvalidRequestException, LogicException, NotFoundException

public abstract class AtlanException extends Exception
Base class for any error raised by interactions with Atlan's APIs.
See Also:
  • Constructor Details

    • AtlanException

      protected AtlanException(ExceptionMessageDefinition error, int statusCode)
      Only intended to be used for exceptions that we pass through the SDK.
      Parameters:
      error - details of the error we pass through
      statusCode - HTTP response code of the error
    • AtlanException

      protected AtlanException(ExceptionMessageDefinition error, int statusCode, Throwable e)
      Only intended to be used for exceptions that we pass through the SDK.
      Parameters:
      error - details of the error we pass through
      statusCode - HTTP response code of the error
      e - the underlying cause of the error
    • AtlanException

      protected AtlanException(ErrorCode error, Throwable e)
    • AtlanException

      protected AtlanException(ErrorCode error, Throwable e, String... params)
  • Method Details

    • getMessage

      public String getMessage()
      Returns a description of the exception, including the HTTP status code and request ID (if applicable).
      Overrides:
      getMessage in class Throwable
      Returns:
      a string representation of the exception.
    • getUserMessage

      public String getUserMessage()
      Returns a description of the user facing exception
      Returns:
      a string representation of the user facing exception.
    • getAtlanError

      public AtlanError getAtlanError()
      The error resource returned by Atlan's API that caused the exception.
    • getCode

      public String getCode()
    • getStatusCode

      public Integer getStatusCode()
    • setAtlanError

      public void setAtlanError(AtlanError atlanError)
      The error resource returned by Atlan's API that caused the exception.