Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.meshqu.com/llms.txt

Use this file to discover all available pages before exploring further.

All error responses follow a consistent structure:
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Human-readable description of what went wrong.",
    "details": {}
  },
  "correlation_id": "uuid-for-support"
}
The correlation_id is included on every response and can be provided to MeshQu support for troubleshooting.

HTTP status codes

StatusCode constantMeaning
200Success.
201Resource created.
400VALIDATION_ERRORRequest body or query parameters failed validation. Check details for field-level errors.
401UNAUTHORIZEDMissing or invalid API key.
403FORBIDDENAPI key lacks the required scope, or tenant ID does not match the key.
404NOT_FOUNDResource does not exist or is not accessible to this tenant.
408REQUEST_TIMEOUTServer-side processing exceeded the timeout.
409DUPLICATE_CODEA policy or group with this code already exists.
429TOO_MANY_REQUESTSRate limit exceeded. See rate-limit-* headers and retryAfter in the body.
500INTERNAL_ERRORUnexpected server error.
503SERVICE_UNAVAILABLEA downstream dependency (e.g. database) is unreachable.

Domain-specific errors

These may appear in the code field for specific operations:
CodeContextMeaning
NO_ACTIVE_POLICIESDecision evaluationNo active policies matched the decision_type.
NO_ACTIVE_RULESDecision evaluationPolicies exist but have no active rules.
SNAPSHOT_NOT_FOUNDDecision replayThe policy snapshot for this decision could not be located.
HYDRATE_FAILEDDecision replay / bundle exportThe persisted decision could not be rehydrated into a verifiable form.
ALREADY_DELIVEREDWebhook retryDelivery was already successful; cannot retry.
STILL_PENDINGWebhook retryDelivery is still pending; no retry needed.
CONFLICTIdempotency / unique constraintsA conflicting record already exists (e.g. duplicate idempotency key, duplicate outcome).

Tenancy

CodeStatusMeaning
MISSING_TENANT_ID400Required tenant header was not present on the request.
INVALID_TENANT_ID400Tenant header value is malformed or unknown.

Policy lifecycle

CodeStatusMeaning
MAKER_CHECKER_VIOLATION403The ratifier is the same user who created the version (when maker-checker is enforced via tenant settings).
RATIFICATION_ERROR400Version is not in the correct lifecycle state for this operation.
NO_DRAFT404Operation requires a draft version but none exists.
NO_VERSIONS404The policy has no versions.

Receipts, chains, and bundles

CodeContextMeaning
SIGNING_FAILEDDecision record / chain sealThe configured signing key could not produce a signature.
CHAIN_TOO_LARGEChain operationsThe chain exceeds the per-tenant size limit.
BUNDLE_EXPORT_DISABLEDBundle endpointsBundle export is not enabled for this tenant.

Evidence manifest

CodeStatusMeaning
EVIDENCE_MANIFEST_MALFORMED400The submitted evidence manifest is not a valid manifest.
EVIDENCE_DIGEST_MISMATCH400A referenced evidence digest does not match the recomputed digest.
EVIDENCE_MANIFEST_REFERENCED_BUT_MISSING400The decision references an evidence manifest that was not supplied.
EVIDENCE_MANIFEST_DIGEST_WITHOUT_FK400An evidence manifest digest was submitted without a corresponding manifest record.

Policy approval receipts

CodeStatusMeaning
POLICY_APPROVAL_RECEIPTS_MALFORMED400The submitted approval receipts are not in the expected shape.
APPROVAL_RECEIPTS_REFERENCED_BUT_MISSING400The decision references approval receipts that were not supplied.
RATIFIER_KEY_REQUIRED400Approval receipt verification requires a ratifier public key that was not configured.

Handling errors in the SDK

The TypeScript SDK throws typed error classes:
import {
  MeshQuError,
  MeshQuValidationError,
  MeshQuAuthError,
  MeshQuForbiddenError,
  MeshQuNotFoundError,
  MeshQuConflictError,
  MeshQuRateLimitError,
  MeshQuNetworkError,
  MeshQuTimeoutError,
} from '@meshqu/client';

try {
  const result = await client.evaluate(context);
} catch (err) {
  if (err instanceof MeshQuRateLimitError) {
    // Back off and retry
  } else if (err instanceof MeshQuValidationError) {
    // Fix request payload
    console.error(err.message, err.details);
  } else if (err instanceof MeshQuAuthError) {
    // Check API key
  } else if (err instanceof MeshQuNetworkError) {
    // Network issue — retry with backoff
  }
}

Correlation IDs

Every response includes a correlation_id (also available as the x-correlation-id response header). Include this when contacting support.

Retry guidance

ErrorRetry?Strategy
400NoFix the request.
401 / 403NoCheck credentials and scopes.
404NoVerify the resource ID.
408YesRetry with same request.
409NoUse a different code or check existing resources.
429YesWait for Retry-After seconds, then retry.
500YesRetry with exponential backoff.
503YesRetry with exponential backoff.