Package dev.dosya.sdk.exception
Class DosyaApiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.dosya.sdk.exception.DosyaException
dev.dosya.sdk.exception.DosyaApiException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionDosyaApiException(int status, String errorMessage) DosyaApiException(int status, String errorMessage, @Nullable String raw) DosyaApiException(int status, String errorMessage, @Nullable String raw, @Nullable String requestId) DosyaApiException(int status, String errorMessage, @Nullable String raw, @Nullable String requestId, @Nullable Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DosyaApiException
-
DosyaApiException
-
DosyaApiException
-
DosyaApiException
-
-
Method Details
-
getStatus
public int getStatus()Returns the HTTP status code. -
getErrorMessage
Returns the error message from the API. -
getRaw
Returns the raw response body, or null. -
getRequestId
Returns the server request ID from theX-Request-Idheader, or null.
-