Package com.datastax.astra.internal.api
Class ApiError
java.lang.Object
com.datastax.astra.internal.api.ApiError
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.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionConstructs a comprehensive error message by combining the exception class name, error code, and the detailed message.
-
Constructor Details
-
ApiError
public ApiError()Default constructor forApiError
. 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
.
-