Package com.tnsai.tools.spi
Class ToolAuthenticationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.tnsai.exceptions.TnsAIException
com.tnsai.tools.spi.ToolException
com.tnsai.tools.spi.ToolAuthenticationException
- All Implemented Interfaces:
Serializable
Tool authentication failed — typically HTTP 401 from upstream, missing
or invalid API key, expired bearer token. Distinct from
ToolAuthorizationException (the credential is valid but lacks
permission for the operation).
Always non-retryable: same credential will keep failing until the caller fixes config / refreshes the token.
- Since:
- 0.5.0 (issue #88)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.tnsai.tools.spi.ToolException
ToolException.Builder, ToolException.ErrorType -
Constructor Summary
ConstructorsConstructorDescriptionToolAuthenticationException(String toolName, String message) ToolAuthenticationException(String toolName, String message, int httpStatusCode, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionGets the error code for this exception type.Methods inherited from class com.tnsai.tools.spi.ToolException
apiError, builder, configurationError, getAttribute, getAttributes, getDetailedMessage, getErrorType, getHttpStatusCode, getQuery, getTimestamp, getToolName, isRetryable, networkError, parseError, timeout, toString, validationErrorMethods inherited from class com.tnsai.exceptions.TnsAIException
getContext, getMaxRetryAttempts, getMessage, getSuggestedRetryDelayMs, getThrownAt, wrapMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ToolAuthenticationException
-
ToolAuthenticationException
-
-
Method Details
-
getErrorCode
Description copied from class:TnsAIExceptionGets the error code for this exception type. Format: TNSAI-XXX where XXX is derived from class name.- Overrides:
getErrorCodein classTnsAIException
-