Class DosyaApiException

All Implemented Interfaces:
Serializable

public final class DosyaApiException extends DosyaException
Thrown when the Dosya API returns an error response.

Carries structured context: HTTP status code, error message from the API, raw response body, and server request ID (if available).

Since:
0.1.0
See Also:
  • Constructor Details

    • DosyaApiException

      public DosyaApiException(int status, String errorMessage)
    • DosyaApiException

      public DosyaApiException(int status, String errorMessage, @Nullable @Nullable String raw)
    • DosyaApiException

      public DosyaApiException(int status, String errorMessage, @Nullable @Nullable String raw, @Nullable @Nullable String requestId)
    • DosyaApiException

      public DosyaApiException(int status, String errorMessage, @Nullable @Nullable String raw, @Nullable @Nullable String requestId, @Nullable @Nullable Throwable cause)
  • Method Details

    • getStatus

      public int getStatus()
      Returns the HTTP status code.
    • getErrorMessage

      public String getErrorMessage()
      Returns the error message from the API.
    • getRaw

      @Nullable public @Nullable String getRaw()
      Returns the raw response body, or null.
    • getRequestId

      @Nullable public @Nullable String getRequestId()
      Returns the server request ID from the X-Request-Id header, or null.