public enum LlmException.ErrorType
- Object
- Enum<LlmException.ErrorType>
- LlmException.ErrorType
ImplementsComparable<LlmException.ErrorType>
Coarse-grained classification of every failure path the
client can surface. Stable – new variants are appended at
the end; existing variants do not change semantics.
Enum constants
AUTH | 401 / 403 – API key invalid, revoked, or lacks access to the requested model. |
RATE_LIMIT | 429 – rate limit hit. |
INVALID_REQUEST | 400 / 422 – malformed request, unsupported parameter, image too large, etc. |
CONTEXT_LENGTH | 400 subtype – the conversation exceeded the model’s context window. |
MODEL_OVERLOADED | 503 / 529 – the model is temporarily overloaded. |
SERVER | 5xx other than 503 / 529 – provider had an internal error. |
NETWORK | DNS, TLS, read-timeout, connection reset – the request did not reach the provider or did not get a response back. |
UNKNOWN | Any failure that doesn’t fit the categories above (e.g. JSON parsing of the response failed). |
Methods
public static LlmException.ErrorType[] values() | |
public static LlmException.ErrorType valueOf(String name) |
Inherited methods
Enum constant details
AUTH
AUTH401 / 403 – API key invalid, revoked, or lacks access to
the requested model.
RATE_LIMIT
RATE_LIMIT429 – rate limit hit. Pair with
getRetryAfterSeconds
to honour the provider’s backoff hint when available.INVALID_REQUEST
INVALID_REQUEST400 / 422 – malformed request, unsupported parameter,
image too large, etc.
CONTEXT_LENGTH
CONTEXT_LENGTH400 subtype – the conversation exceeded the model’s
context window. Drop older turns and retry, or switch
to a longer-context model.
MODEL_OVERLOADED
MODEL_OVERLOADED503 / 529 – the model is temporarily overloaded. Same
recovery as RATE_LIMIT but a different signal source.
SERVER
SERVER5xx other than 503 / 529 – provider had an internal error.
NETWORK
NETWORKDNS, TLS, read-timeout, connection reset – the request
did not reach the provider or did not get a response back.
UNKNOWN
UNKNOWNAny failure that doesn’t fit the categories above (e.g.
JSON parsing of the response failed). Treat as a generic
programming error and log
getRawBody.Method details
values
public static LlmException.ErrorType[] values()valueOf
public static LlmException.ErrorType valueOf(String name)