Package com.tnsai.tools.spi
Enum Class ToolException.ErrorType
- All Implemented Interfaces:
Serializable,Comparable<ToolException.ErrorType>,Constable
- Enclosing class:
ToolException
Error type classification.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionGeneric API errorAuthentication/authorization failedTool execution cancelledMissing or invalid configuration (API key, etc.)Network connectivity issueResource not foundFailed to parse responseRate limit exceededServer error (5xx)Request timeoutUnknown errorInput validation failed -
Method Summary
Modifier and TypeMethodDescriptionstatic ToolException.ErrorTypeInfer error type from exception.booleanstatic ToolException.ErrorTypeReturns the enum constant of this class with the specified name.static ToolException.ErrorType[]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
-
VALIDATION
Input validation failed -
CONFIGURATION
Missing or invalid configuration (API key, etc.) -
AUTHENTICATION
Authentication/authorization failed -
RATE_LIMITED
Rate limit exceeded -
NOT_FOUND
Resource not found -
TIMEOUT
Request timeout -
NETWORK
Network connectivity issue -
SERVER_ERROR
Server error (5xx) -
API_ERROR
Generic API error -
PARSE_ERROR
Failed to parse response -
CANCELLED
Tool execution cancelled -
UNKNOWN
Unknown error
-
-
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
-
isRetryable
public boolean isRetryable() -
fromException
Infer error type from exception.
-