Package com.atlan.exception
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
Base class for any error raised by interactions with Atlan's APIs.
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
AtlanException
(ErrorCode error, Throwable e) protected
AtlanException
(ErrorCode error, Throwable e, String... params) protected
AtlanException
(ExceptionMessageDefinition error, int statusCode) Only intended to be used for exceptions that we pass through the SDK.protected
AtlanException
(ExceptionMessageDefinition error, int statusCode, Throwable e) Only intended to be used for exceptions that we pass through the SDK. -
Method Summary
Modifier and TypeMethodDescriptionThe error resource returned by Atlan's API that caused the exception.getCode()
Returns a description of the exception, including the HTTP status code and request ID (if applicable).Returns a description of the user facing exceptionvoid
setAtlanError
(AtlanError atlanError) The error resource returned by Atlan's API that caused the exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AtlanException
Only intended to be used for exceptions that we pass through the SDK.- Parameters:
error
- details of the error we pass throughstatusCode
- HTTP response code of the error
-
AtlanException
Only intended to be used for exceptions that we pass through the SDK.- Parameters:
error
- details of the error we pass throughstatusCode
- HTTP response code of the errore
- the underlying cause of the error
-
AtlanException
-
AtlanException
-
-
Method Details
-
getMessage
Returns a description of the exception, including the HTTP status code and request ID (if applicable).- Overrides:
getMessage
in classThrowable
- Returns:
- a string representation of the exception.
-
getUserMessage
Returns a description of the user facing exception- Returns:
- a string representation of the user facing exception.
-
getAtlanError
The error resource returned by Atlan's API that caused the exception. -
getCode
-
getStatusCode
-
setAtlanError
The error resource returned by Atlan's API that caused the exception.
-