Package com.anthropic.errors
Class AnthropicServiceException
-
- All Implemented Interfaces:
-
java.io.Serializable
public abstract class AnthropicServiceException extends AnthropicException
-
-
Method Summary
Modifier and Type Method Description abstract IntegerstatusCode()abstract Headersheaders()abstract JsonValuebody()final Optional<ErrorType>errorType()The error type from the API response body (e.g. -
Methods inherited from class kotlin.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
statusCode
abstract Integer statusCode()
-
errorType
final Optional<ErrorType> errorType()
The error type from the API response body (e.g., ErrorType.RATE_LIMIT_ERROR, ErrorType.OVERLOADED_ERROR).
Extracted from
body.error.type. Returns Optional.empty if the body doesn't contain a structured error with a type field.
-
-
-
-