Interface NessieError


@Immutable public interface NessieError
Represents Nessie-specific API error details.

All clients receive all properties that are not marked with an @since Javadoc tag. Those properties, like the getErrorDetails() property, will only be returned to clients, if they sent the appropriate Nessie-Client-Spec header. The header value is an integer that must be greater than or equal to the version noted in the @since Javadoc tag.

  • Method Details

    • getStatus

      int getStatus()
      HTTP status code of this error.
    • getReason

      String getReason()
      Reason phrase for the HTTP status code.
    • getMessage

      @Default default 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-Spec with an integer value that is at least 2.
    • getErrorDetailsAsOrNull

      default <T extends NessieErrorDetails> T getErrorDetailsAsOrNull(Class<T> type)
    • getServerStackTrace

      @Nullable @Nullable String getServerStackTrace()
      Server-side exception stack trace related to this error (if available).
    • getClientProcessingException

      @Auxiliary @Nullable @Nullable @Deprecated Exception getClientProcessingException()
      Client-side Exception related to the processing of the error response.

      This Exception generally represents any errors related to the decoding of the payload returned by the server to describe the error.

    • getClientProcessingError

      @Auxiliary @Nullable @Nullable String getClientProcessingError()
      Client-side error message related to the processing of the error response.

      This generally represents any errors related to the decoding of the payload returned by the server to describe the error.

    • getFullMessage

      default String getFullMessage()
      The full error message, including HTTP status, reason, server- and client-side exception stack traces.