Class DataAPIErrorDescriptor
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.datastax.astra.client.exceptions.DataAPIErrorDescriptor
- All Implemented Interfaces:
Serializable
Encapsulates error details from a JSON API response. This class is used to represent error information
such as messages, codes, and exception classes associated with an API request failure. It allows for
a structured way to convey error details from the server to the client.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionConstructs a comprehensive error message by combining the exception class name, error code, and the detailed message.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DataAPIErrorDescriptor
public DataAPIErrorDescriptor()Default constructor forDataAPIErrorDescriptor
. Initializes a new instance of the class without setting any properties. Properties should be set via their setters or directly, depending on the usage context and the framework's conventions.
-
-
Method Details
-
getErrorMessage
Constructs a comprehensive error message by combining the exception class name, error code, and the detailed message. This method is useful for logging or displaying a complete error message to the end-user or developer.- Returns:
- A concatenated string representing the full error message, which may include the exception class name,
the error code in parentheses, and the detailed error message. Each element is included only if it is not
null
.
-
getLocalizedMessage
- Overrides:
getLocalizedMessage
in classThrowable
-