Class AnkaSecureSdkException
Object
Throwable
Exception
RuntimeException
AnkaSecureSdkException
- All Implemented Interfaces:
Serializable
Unchecked wrapper for any error returned by the Anka Secure SDK.
Besides the HTTP status and raw response body, the exception carries an
arbitrary key/value context map - e.g. kid
,
oldKid
, newKid
, jobId
. Callers can retrieve those
values with ctx(String)
.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConvenience accessor.Returns an unmodifiable view of the context map.Raw server body (may be empty).int
HTTP status code, or -1 when not applicable.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AnkaSecureSdkException
public AnkaSecureSdkException(String message, int statusCode, String responseBody, Throwable cause, Map<String, String> context) Creates a new SDK exception.- Parameters:
message
- human‑readable descriptionstatusCode
- HTTP status (or -1 for local/IO errors)responseBody
- raw server body (may benull
)cause
- root cause (may benull
)context
- extra diagnostic data (immutable copy is stored)
-
-
Method Details
-
getStatusCode
public int getStatusCode()HTTP status code, or -1 when not applicable. -
getResponseBody
Raw server body (may be empty). -
getContext
-
ctx
-