ZyrisDocs
Protocol specification

Errors and close codes

The registered protocol error codes, retriability, and websocket close codes.

Error objects

An err envelope and an s_err both carry an error object:

{ "code": "invalid_params", "message": "…", "retriable": false, "data": null }

code is a string. retriable is explicit on every instance: a callee may mark a normally retriable failure as permanent, or the reverse. data is optional structured detail.

Registered codes

CodeRetriable by conventionMeaning
parse_errorA frame or envelope could not be decoded.
unsupported_versionThe peers share no protocol version.
unauthorizedThe credential was not accepted.
forbidden_scopeThe credential lacks the scope this call needs.
method_not_foundNo such method or tool.
invalid_paramsThe arguments do not match the tool's schema or rules.
capability_not_announcedThe peer has not announced this capability.
capability_rejectedAn announced capability was refused, e.g. a reserved name.
capability_unavailableThe capability was withdrawn while the call was in flight.
node_offlineyesThe node the call is for is not reachable from here.
connection_lostyesThe connection dropped with the call in flight.
stream_laggedyesA gap was detected in a stream's chunks.
credit_violationA stream sender exceeded its flow-control credit.
payload_too_largeA frame or value exceeded a declared limit.
overloadedyesToo many requests in flight.
canceledThe call was cancelled.
timeoutyesThe call did not finish in time.
internalSomething failed inside the callee.

Capabilities may define additional codes. They MUST NOT collide with this registry.

Websocket close codes

CodeMeaning
1000Graceful close.
4400Unsupported protocol version.
4401Authentication failed, or the credential was revoked.
4408Unknown frame kind, or a malformed frame.
4409Flow-control violation.

On this page