Package org.projectnessie.error
Interface NessieError
-
@Immutable public interface NessieErrorRepresents Nessie-specific API error details.All clients receive all properties that are not marked with an
@sinceJavadoc tag. Those properties, like thegetErrorDetails()property, will only be returned to clients, if they sent the appropriateNessie-Client-Specheader. The header value is an integer that must be greater than or equal to the version noted in the@sinceJavadoc tag.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.ExceptiongetClientProcessingException()Client-sideExceptionrelated to the processing of the error response.default ErrorCodegetErrorCode()Nessie-specific error code.NessieErrorDetailsgetErrorDetails()Details for this particular error.default <T extends NessieErrorDetails>
TgetErrorDetailsAsOrNull(java.lang.Class<T> type)default java.lang.StringgetFullMessage()The full error message, including HTTP status, reason, server- and client-side exception stack traces.default java.lang.StringgetMessage()Nessie-specific Error message.java.lang.StringgetReason()Reason phrase for the HTTP status code.java.lang.StringgetServerStackTrace()Server-side exception stack trace related to this error (if available).intgetStatus()HTTP status code of this error.
-
-
-
Method Detail
-
getStatus
int getStatus()
HTTP status code of this error.
-
getReason
java.lang.String getReason()
Reason phrase for the HTTP status code.
-
getMessage
@Default default java.lang.String getMessage()
Nessie-specific Error message.
-
getErrorCode
@Default default ErrorCode getErrorCode()
Nessie-specific error code.
-
getErrorDetails
@Nullable @Nullable NessieErrorDetails getErrorDetails()
Details for this particular error.- Since:
- Nessie Client spec 2, only serialized to clients, if clients send the HTTP header
Nessie-Client-Specwith an integer value that is at least 2.
-
getErrorDetailsAsOrNull
default <T extends NessieErrorDetails> T getErrorDetailsAsOrNull(java.lang.Class<T> type)
-
getServerStackTrace
@Nullable @Nullable java.lang.String getServerStackTrace()
Server-side exception stack trace related to this error (if available).
-
getClientProcessingException
@Auxiliary @Nullable @Nullable java.lang.Exception getClientProcessingException()
Client-sideExceptionrelated to the processing of the error response.This
Exceptiongenerally represents any errors related to the decoding of the payload returned by the server to describe the error.
-
getFullMessage
default java.lang.String getFullMessage()
The full error message, including HTTP status, reason, server- and client-side exception stack traces.
-
-