Skip to main content

Reference Error Codes

This document defines the standard error code taxonomy for PTI v1.0 implementations.

Normative language

The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL are to be interpreted as described in RFC 2119.

Error response envelope

All error responses MUST use:

{
"error": {
"code": "PTI-4001",
"message": "Unsupported schema version",
"detail": "trust_event.v2 is not enabled for this tenant",
"correlation_id": "req_9a8b7c6d",
"retryable": false,
"docs_uri": "https://docs.example/pti/errors/PTI-4001"
}
}
FieldRequirement
codeMUST — stable machine identifier
messageMUST — short human-readable summary
detailSHOULD — operator-safe elaboration
correlation_idMUST — matches request
retryableMUST — boolean hint for clients
docs_uriOPTIONAL — documentation link

Implementations MUST NOT expose stack traces or internal hostnames in production error bodies.

HTTP status mapping

HTTPUsage
400Client payload or parameter errors (PTI-400x)
401Authentication failure (PTI-401x)
403Authorization or policy denial (PTI-403x)
404Resource or subject not found (PTI-404x)
409Conflict / idempotency (PTI-409x)
422Semantic validation (PTI-422x)
429Rate limit (PTI-4290)
500Internal error (PTI-500x)
503Temporary unavailability (PTI-503x)

Validation errors (PTI-400x)

CodeMessageRetryable
PTI-4001Unsupported schema versionNo
PTI-4002Unknown event typeNo
PTI-4003Invalid timestampNo
PTI-4004Missing required fieldNo
PTI-4005Invalid context_idNo
PTI-4006Payload schema validation failedNo
PTI-4007Invalid pti_id formatNo

Authentication errors (PTI-401x)

CodeMessageRetryable
PTI-4010Missing credentialsNo
PTI-4011Invalid or expired tokenNo
PTI-4012Invalid signatureNo
PTI-4013Credential revokedNo

Authorization errors (PTI-403x)

CodeMessageRetryable
PTI-4030Insufficient scopeNo
PTI-4031Context not entitledNo
PTI-4032Lookup tier not entitledNo
PTI-4033Consent requiredNo
PTI-4034Subject suppressedNo
PTI-4035Cross-tenant access deniedNo
PTI-4036Producer not enabled for contextNo

TumiTrust institution Trust Check and report generate responses MAY return a flat body alias for mobile and partner LOS clients:

{
"success": false,
"code": "consent_required",
"error_type": "consent_required",
"reason": "consent_required",
"error": "Active access consent from the member is required before this Trust Check.",
"partner_id": 123,
"partner_name": "Demo Bank ZN"
}

HTTP status MUST be 403. Normative mapping: consent_requiredPTI-4033. Product language: access consent / member / institution (not lender/borrower).

Not found errors (PTI-404x)

CodeMessageRetryable
PTI-4040Resource not foundNo
PTI-4041Subject not resolvedNo
PTI-4042Report not found or expiredNo
PTI-4043Event not foundNo

Conflict errors (PTI-409x)

CodeMessageRetryable
PTI-4090Identity merge conflictNo
PTI-4091Idempotency key conflictNo
PTI-4092Concurrent modificationYes

Semantic errors (PTI-422x)

CodeMessageRetryable
PTI-4220Event context binding mismatchNo
PTI-4221Retraction target not materializedNo
PTI-4222Assertion signature invalidNo
PTI-4223Policy pack violationNo

Rate limiting (PTI-429x)

CodeMessageRetryable
PTI-4290Rate limit exceededYes

Clients SHOULD honor Retry-After headers when present.

Server errors (PTI-500x)

CodeMessageRetryable
PTI-5000Internal errorYes
PTI-5001Downstream registry unavailableYes
PTI-5002Intelligence engine timeoutYes

Service unavailable (PTI-503x)

CodeMessageRetryable
PTI-5030Maintenance modeYes
PTI-5031OverloadedYes

Client handling guidance

  • Clients MUST log correlation_id for support escalation.
  • Producers SHOULD persist PTI-4091 conflicts for manual reconciliation.
  • Consumers MUST NOT retry 403x errors without entitlement change.

Extension rules

Implementations MAY define vendor-specific codes only above PTI-9000. Codes below PTI-9000 are reserved by the PTI specification.