Skip to main content
Canonical error codes and verdicts used across the Truthlocks platform. These codes are stable and can be used for programmatic error handling.

Verification Verdicts

Verification reasons

When you call the Verify endpoint, the response includes a reasons array with additional context. These reason codes are informational and appear alongside the verdict:

API error codes

General

Attestations and issuers

API keys

Consumer

Identity and DID

SSO

Policy and governance

Billing and limits

Data residency

Retryable vs. terminal errors

When deciding whether to retry a failed request, use the HTTP status code to determine if the error is transient or permanent.

Retryable (transient)

These errors are automatically retried by the SDKs when MaxRetries (or equivalent) is configured:

Terminal (do not retry)

These errors indicate a problem with the request that won’t resolve by retrying:
All three SDKs handle retryable errors automatically with exponential backoff and jitter. You only need manual retry logic if you’ve disabled automatic retries or want custom behavior on top of the SDK defaults.

Error response format

Every error response returns a JSON object with two fields:
  • code — a stable, machine-readable error code from the tables above. Use this for programmatic error handling.
  • message — a human-readable description of what went wrong. Messages may change between releases; do not match on them programmatically.
Error messages that would expose infrastructure details (such as database connection strings or internal hostnames) are automatically replaced with a generic message before being returned to the client. The original details are logged server-side only.

Gateway errors (RFC 7807)

When a request reaches the API gateway but does not match any valid route, the gateway returns a structured error response following the RFC 7807 Problem Details specification. This applies to 404 Not Found and 405 Method Not Allowed errors at the gateway level.

Response format

Gateway errors use application/problem+json as the content type and include four fields:

When you see these errors

  • 404 Not Found — The request path does not match any API route. Double-check the URL, including the /v1/ version prefix and resource name.
  • 405 Method Not Allowed — The request path exists, but the HTTP method you used (for example, DELETE on a read-only endpoint) is not supported. Check the API reference for the correct method.

Handling gateway errors in code

If you parse error responses programmatically, check the Content-Type header to distinguish gateway errors from application errors:
  • application/problem+json — Gateway-level error (RFC 7807). Use the status and title fields.
  • application/json — Application-level error. Use the code and message fields.
The Truthlocks SDKs handle both error formats automatically. You only need to distinguish between them if you are calling the API directly.

Canonical Enums

Algorithm

* Ed25519 * ES256 * ES384 * ES512 * RS256 * RS384 * RS512 * PS256 * PS384 * PS512

Issuer Status

  • pending * trusted * suspended * revoked

Trust Tier

  • self_issued * verified_org * regulated_issuer

Key Status

  • ACTIVE * DISABLED * EXPIRED * COMPROMISED

Attestation Status

* ACTIVE * REVOKED * SUPERSEDED

Risk Rating

  • unknown * low * medium * high * critical