NitroStack Logo
/python
/sdk
/error handling

Error Handling

Public error types from nitrostack:

ErrorWhen
ToolExecutionErrorTool failed
ValidationErrorPydantic / input parse failed
ResourceNotFoundErrorUnknown resource URI
PromptNotFoundErrorUnknown prompt
ConfigurationErrorBad config
DependencyResolutionErrorDI miss
OAuthError / TokenInactiveError / AudienceMismatchErrorOAuth
TaskCancelledError / TaskNotFoundError / TaskAlreadyTerminalError / InvalidTaskTransitionError / TaskExpiredErrorMCP tasks

Exception filters: async def catch(self, error, context) stacked with @use_filters. Scaffold: nitrostack-py generate filter HttpException.

JSON-RPC codes: JsonRpcErrorCode.