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 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-Spec with 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-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.

      • getFullMessage

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