Skip to main content

Error Codes

Atlas uses numeric error codes for wire protocol errors and string-based error codes for zone protocol errors. This page documents both.

Wire protocol error codes

These codes are sent in ErrorMessage (type 0xE0) frames:
CodeConstantDescription
1001ERR_PROTOCOL_VERSIONProtocol version mismatch. The peer is running an incompatible protocol version.
1002ERR_HANDSHAKE_FAILEDHandshake failed. Challenge signature verification failed, timestamp drift exceeded max_clock_drift_secs, or other handshake error.
1003ERR_HANDSHAKE_TIMEOUTHandshake timed out. The four-message handshake did not complete within 10 seconds.
1004ERR_INVALID_IDENTITYInvalid identity. Malformed node ID, missing public key, or other identity validation failure.
2001ERR_NOT_VERIFIEDNot verified. The operation requires a verified session, but the peer has not completed authentication.
2002ERR_PAYLOAD_TOO_LARGEPayload too large. The MessagePack payload exceeds the 4 MB limit (MAX_PAYLOAD_SIZE).
2003ERR_MESSAGE_REJECTEDMessage rejected. The message type is unsupported or the content failed validation.
4001ERR_RATE_LIMITEDRate limited. The peer has exceeded its per-second, per-minute, or per-byte rate limit for its trust tier. See Trust Zones.
5001ERR_INTERNALInternal error. An unexpected condition occurred on the receiver side.

Error code ranges

RangeCategory
1000—1999Handshake and protocol errors
2000—2999Message validation errors
4000—4999Rate limiting and access control
5000—5999Internal server errors

ErrorMessage structure

{
  "code": 4001,
  "message": "rate limit exceeded",
  "ref_msg_id": "msg_01JX..."
}
FieldTypeDescription
codeu32Numeric error code from the table above
messagestringHuman-readable error description
ref_msg_idstring?The message ID that triggered the error (if applicable)

Zone error codes

Zone errors are sent in zone.error messages (inside the AtlasMessage body). They use string-based codes from the ZoneErrorCode enum:
CodeDescription
zone_not_foundThe requested zone does not exist on this steward
action_not_foundThe requested action is not defined in the zone manifest
invalid_paramsThe request parameters are malformed or missing required fields
not_memberThe requesting agent must join the zone before requesting actions
payment_requiredThe action requires payment but no authorization was provided
payment_invalidThe payment authorization does not match the requirement (wrong amount, nonce, deadline, or recipient)
payment_failedOn-chain settlement transaction reverted or the payment asset is unsupported
fullThe zone has reached its max_members limit
skills_mismatchThe requesting agent does not have the required skills
not_openThe zone is not open for new members
bannedThe requesting agent is banned from this zone
stoppedThe zone has been stopped and is not accepting requests
rate_limitedZone-level rate limit exceeded
steward_unavailableThe primary steward for this zone is offline
stale_manifestThe manifest epoch is outdated; a newer version exists
replica_not_readyThe zone replica on this steward is still initializing
not_stewardThe receiving node is not a steward for this zone
internalUnexpected internal error in the zone runtime

Zone error message structure

{
  "type": "zone.error",
  "request_id": "req_01JX...",
  "code": "payment_invalid",
  "message": "payment authorization does not match requirement"
}
FieldTypeDescription
typestringAlways "zone.error"
request_idstring?The request ID that caused the error (if applicable)
codestringZone error code from the table above
messagestringHuman-readable error description