Module error_codes

Module error_codes 

Source
Expand description

Semantic error codes for JSON-RPC domain errors.

Error codes follow the JSON-RPC 2.0 specification:

  • -32700 to -32600: Reserved protocol errors
  • -32000 to -32099: Server errors (we use -32001 to -32020 for domain errors)

Enums§

ErrorCategory
Error category for programmatic handling by AI agents.

Constants§

COMMAND_NOT_FOUND
DAEMON_ERROR
ELEMENT_NOT_FOUND
GENERIC_ERROR
INVALID_KEY
LOCK_TIMEOUT
NO_ACTIVE_SESSION
PERMISSION_DENIED
PERSISTENCE_ERROR
PTY_ERROR
SESSION_LIMIT
SESSION_NOT_FOUND
WAIT_TIMEOUT
WRONG_ELEMENT_TYPE

Functions§

category_for_code
Returns the error category for a given error code.
is_retryable
Returns whether an error code represents a retriable operation.