MACP Error Code Registry
Defines machine-readable error identifiers used by MACP runtimes.
Identifier Format
UPPER_SNAKE_CASE
Standard Error Codes
| Code | Description | HTTP Status | Status | Reference |
|---|---|---|---|---|
| UNAUTHENTICATED | Authentication failed | 401 | permanent | RFC-MACP-0004 |
| FORBIDDEN | Authenticated sender is not authorized for the session or message type | 403 | permanent | RFC-MACP-0004 |
| SESSION_NOT_FOUND | Session does not exist | 404 | permanent | RFC-MACP-0001 |
| SESSION_NOT_OPEN | Session already resolved or expired | 409 | permanent | RFC-MACP-0001 |
| DUPLICATE_MESSAGE | message_id already accepted within the session | 409 | permanent | RFC-MACP-0001 |
| INVALID_ENVELOPE | Envelope validation failed or payload did not satisfy the required structural contract | 400 | permanent | RFC-MACP-0001 |
| UNSUPPORTED_PROTOCOL_VERSION | No mutually supported protocol version exists, or an envelope uses an unsupported negotiated version | 400 | permanent | RFC-MACP-0001 |
| MODE_NOT_SUPPORTED | The referenced coordination mode or mode version is not supported for new sessions | 400 | permanent | RFC-MACP-0002 |
| PAYLOAD_TOO_LARGE | Payload exceeds allowed size | 413 | permanent | RFC-MACP-0001 |
| RATE_LIMITED | Too many requests | 429 | permanent | RFC-MACP-0004 |
| INVALID_SESSION_ID | session_id format does not meet deployment requirements (e.g., not a valid UUID or base64url token) | 400 | permanent | RFC-MACP-0001 |
| INTERNAL_ERROR | Unrecoverable internal runtime error (e.g., storage failure); clients SHOULD retry or escalate | 500 | permanent | RFC-MACP-0001 |
| UNAUTHORIZED | Historical alias for FORBIDDEN; new implementations SHOULD use FORBIDDEN | 403 | deprecated | RFC-MACP-0004 |
Error Design Principles
Errors should:
- be stable across versions
- avoid leaking sensitive system details
- be machine-readable
- distinguish protocol version negotiation failures from envelope-shape failures
- distinguish unsupported modes from generic invalid-envelope rejections