Package com.tnsai.observability.errors
Enum Class ErrorCategory
- All Implemented Interfaces:
Serializable,Comparable<ErrorCategory>,Constable
Coarse classification of errors for routing, alerting, and budget tracking.
Each error reported via ErrorEmitter carries an
ErrorCategory so dashboards can group "transient network blips"
separately from "persistent auth failures" and operators can wire
different alert/escalation policies per category.
- Since:
- 0.5.0 (issue #86)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMisconfiguration — missing LLM, wrong model name, malformed role spec.Third-party system failure — MCP server down, webhook 5xx, DB unavailable.Framework-internal bug — should not happen in production.Assertion / invariant violation — internal logic bug, illegal state.Will not succeed on retry — bad credentials, invalid request, unsupported model.Exhausted resource — token budget, rate limit, capacity, disk full.Blocked by policy — content filter, prompt injection detector, approval denied.Will likely succeed on retry — network blip, overloaded model, transient 5xx.Could not classify — defensive fallback. -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorCategoryReturns the enum constant of this class with the specified name.static ErrorCategory[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
TRANSIENT
Will likely succeed on retry — network blip, overloaded model, transient 5xx. -
PERMANENT
Will not succeed on retry — bad credentials, invalid request, unsupported model. -
SECURITY
Blocked by policy — content filter, prompt injection detector, approval denied. -
CONFIG
Misconfiguration — missing LLM, wrong model name, malformed role spec. -
RESOURCE
Exhausted resource — token budget, rate limit, capacity, disk full. -
LOGIC
Assertion / invariant violation — internal logic bug, illegal state. -
EXTERNAL
Third-party system failure — MCP server down, webhook 5xx, DB unavailable. -
INTERNAL
Framework-internal bug — should not happen in production. -
UNKNOWN
Could not classify — defensive fallback.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-