MACP

MACP Error Code Registry

Defines machine-readable error identifiers used by MACP runtimes.

Identifier Format

UPPER_SNAKE_CASE

Standard Error Codes

CodeDescriptionHTTP StatusStatusReference
UNAUTHENTICATEDAuthentication failed401permanentRFC-MACP-0004
FORBIDDENAuthenticated sender is not authorized for the session or message type403permanentRFC-MACP-0004
SESSION_NOT_FOUNDSession does not exist404permanentRFC-MACP-0001
SESSION_NOT_OPENSession already resolved or expired409permanentRFC-MACP-0001
DUPLICATE_MESSAGEmessage_id already accepted within the session409permanentRFC-MACP-0001
INVALID_ENVELOPEEnvelope validation failed or payload did not satisfy the required structural contract400permanentRFC-MACP-0001
UNSUPPORTED_PROTOCOL_VERSIONNo mutually supported protocol version exists, or an envelope uses an unsupported negotiated version400permanentRFC-MACP-0001
MODE_NOT_SUPPORTEDThe referenced coordination mode or mode version is not supported for new sessions400permanentRFC-MACP-0002
PAYLOAD_TOO_LARGEPayload exceeds allowed size413permanentRFC-MACP-0001
RATE_LIMITEDToo many requests429permanentRFC-MACP-0004
INVALID_SESSION_IDsession_id format does not meet deployment requirements (e.g., not a valid UUID or base64url token)400permanentRFC-MACP-0001
INTERNAL_ERRORUnrecoverable internal runtime error (e.g., storage failure); clients SHOULD retry or escalate500permanentRFC-MACP-0001
UNAUTHORIZEDHistorical alias for FORBIDDEN; new implementations SHOULD use FORBIDDEN403deprecatedRFC-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