Package com.tnsai.rag
Enum Class RetrievalException.Reason
- All Implemented Interfaces:
Serializable,Comparable<RetrievalException.Reason>,Constable
- Enclosing class:
RetrievalException
Stable failure categories shared by chat and action entry points.
Each constant is fixed on one side of the
@Search.onFailure boundary, and
surfacesAboveFailurePolicy() is the authoritative answer.
A declaration that cannot be honoured must fail the caller;
a transport failure is what the failure policy exists to
absorb. Routing a declaration fault through the policy is the defect
this taxonomy exists to prevent: onFailure = CONTINUE would
leave the caller ungrounded while reporting success.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe retrieval declaration cannot be honoured.Retrieval was attempted on a closed engine.The retrieval backend threw or returned no result, including a backend that is unreachable at this moment.NoRetrievalEngineProvideris installed, or a provider refused to build an engine for the owner's source set.A declared source could not be loaded completely.The absolute request deadline elapsed. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this failure must reach the caller unmodified rather than being absorbed by@Search.onFailure.static RetrievalException.ReasonReturns the enum constant of this class with the specified name.static RetrievalException.Reason[]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
-
CONFIGURATION
The retrieval declaration cannot be honoured. Surfaces above the failure policy. -
TIMEOUT
The absolute request deadline elapsed. Transport-class, so the failure policy applies. -
PROVIDER_UNAVAILABLE
NoRetrievalEngineProvideris installed, or a provider refused to build an engine for the owner's source set. This is a deployment fault rather than a transient one — an agent with no retrieval runtime at all would otherwise answer ungrounded while reporting success — so it surfaces above the failure policy. -
EXECUTION
The retrieval backend threw or returned no result, including a backend that is unreachable at this moment. Transport-class, so the failure policy applies. -
ENGINE_CLOSED
Retrieval was attempted on a closed engine. A lifecycle programming error; swallowing it would mask the defect and silently degrade every later invocation, so it surfaces above the failure policy. -
SOURCE_LOADING
A declared source could not be loaded completely. Unlike a successfully loaded source with no documents, this is a failure that the declared failure policy may handle.
-
-
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
-
surfacesAboveFailurePolicy
public boolean surfacesAboveFailurePolicy()Returns whether this failure must reach the caller unmodified rather than being absorbed by@Search.onFailure.- Returns:
truefor declaration and lifecycle faults,falsefor transport faults the policy may handle
-