is_recoverable
Function
This function is defined in the protocols module.Classify a connect-error code as recoverable (transient) or terminal. A single source of truth shared by the bundled gateway client and any alternative client so terminal-versus-transient handling stays consistent.
Signature
Parameters
'ConnectErrorCode \| str'
required
A :class:
ConnectErrorCode or its string value.Returns
bool
True when an auto-reconnecting client should back off and retry
(e.g. RATE_LIMITED, or an unknown/future code — fail open to
retry). False for terminal auth/pairing/protocol/origin/config
failures (and AGENT_NOT_FOUND, which the server emits with a
do-not-retry recovery step) where reconnecting will not help until
an operator intervenes.Uses
ConnectErrorCode
Source
View on GitHub
praisonaiagents/gateway/protocols.py at line 143
