code: A unique, stable identifier for the error (format: TRC-XXXX).
title: A brief summary of the issue.
message: Detailed guidance for resolving the error.
Field-level error detailsFor issues specific to individual fields, a fields object provides additional context.Examples:
{ "code":"TRC-0106", "title":"Missing Required Field", "message":"The name field is required. Please provide a name for the rule and try again.", "fields": { "name": "name is a required field" }}
Authentication failures return "code": "Unauthenticated" (not a TRC code) with HTTP 401. This is a stable, well-known identifier rather than a TRC code, so clients should match on the literal string.
These errors come from the usage counter subsystem that backs spending-limit enforcement. Most are surfaced as 500 Internal Server Error responses with the corresponding TRC code.
code
title
message
TRC-0160
Usage Counter Overflow
The usage counter would overflow. Please contact support.
TRC-0161
Internal Server Error
Usage counter limitID is required (internal invariant). Please contact support.
TRC-0162
Internal Server Error
Usage counter scopeKey is required (internal invariant). Please contact support.
TRC-0163
Internal Server Error
Usage counter periodKey is required (internal invariant). Please contact support.
TRC-0164
Internal Server Error
Usage counter currentUsage must be non-negative (internal invariant). Please contact support.
TRC-0165
Internal Server Error
Increment amount must be non-negative (internal invariant). Please contact support.
TRC-0166
Usage Counter Not Found
The usage counter for this limit and scope does not exist. Please verify the limit configuration.
TRC-0167
Limit Exceeded
The transaction would exceed the limit maximum. The validation will be denied.
TRC-0168
Internal Server Error
Decrement amount must be non-negative (internal invariant). Please contact support.
These errors occur during limit enforcement on validation requests. Most are internal invariants; user-facing variants typically surface via Validation Request errors (TRC-0220 series).
code
title
message
TRC-0180
Invalid Amount
The transaction amount must be positive for limit checks. Please provide a valid amount.
TRC-0181
Invalid Currency
The currency must be a valid ISO 4217 code for limit checks. Please verify the currency code.
TRC-0183
Unknown Limit Type
The limit type is not recognized for period key calculation. Please contact support.
TRC-0184
Invalid Timestamp
The timestamp must not be zero for limit checks. Please provide a valid timestamp.
TRC-0185
Internal Server Error
Limit check input is missing or null (internal invariant). Please contact support.
TRC-0186
Missing Account ID
The account ID is required for limit checks. Please provide an accountId.
TRC-0187
Invalid Transaction Type
The transactionType must be one of CARD, WIRE, PIX, or CRYPTO for limit checks.
TRC-0188
SubType Too Long
The subType exceeds the maximum length of 50 characters for limit checks.
TRC-0189
Invalid Segment ID
The segmentId cannot be the zero UUID. Please provide a valid UUID.
TRC-0190
Invalid Portfolio ID
The portfolioId cannot be the zero UUID. Please provide a valid UUID.
TRC-0191
Invalid Merchant ID
The merchantId cannot be the zero UUID. Please provide a valid UUID.
These codes are surfaced by the operational /readyz endpoint and by the worker supervisor lifecycle. They appear in the JSON error field of /readyz responses, not in /v1/* API responses. Operators rely on the literal code (not the message) for dashboard alerting.
code
title
message
TRC-0328
Database Connection Not Established
The PostgreSQL connection has not been established. Wait for service startup to complete.
TRC-0329
Database Connection Failed
The PostgreSQL connection attempt failed. Check database availability and credentials.
TRC-0330
Database Ping Failed
The PostgreSQL ping probe failed. The database may be unreachable or unresponsive.
TRC-0331
Dependencies Unhealthy
One or more dependencies reported unhealthy on the readiness probe. The service is returning HTTP 503.
TRC-0332
Rule Cache Not Ready
The rule cache is not ready to serve readiness traffic. The service will become ready after warm-up completes.
TRC-0333
Rule Cache Stale
The rule cache data is stale beyond the configured threshold. Background sync may be lagging.
TRC-0334
Worker Supervisor Shutting Down
The worker supervisor is shutting down and refused to spawn new tenant workers. New tenants will be rejected with HTTP 503 until the next instance is healthy.
These codes surface only at service startup when MULTI_TENANT_ENABLED=true and a required configuration is missing or incompatible. They appear in startup logs (and prevent the service from starting) — they never reach /v1/* API consumers.
code
title
message
TRC-0320
Multi-Tenant Config Required
Multi-tenant configuration is required when MULTI_TENANT_ENABLED=true. Please verify the service configuration.
TRC-0321
Multi-Tenant Logger Required
Multi-tenant initialization requires a logger instance. This is a service-internal error; contact support.
TRC-0322
Multi-Tenant URL Required
MULTI_TENANT_URL must be set when MULTI_TENANT_ENABLED=true. Set the Tenant Manager URL and restart the service.
TRC-0323
Multi-Tenant URL Invalid
MULTI_TENANT_URL must be a valid absolute URL with scheme and host (e.g., https://tenant-manager.example.com).
TRC-0324
Multi-Tenant Service API Key Required
MULTI_TENANT_SERVICE_API_KEY must be set when MULTI_TENANT_ENABLED=true. Provide the API key for calling the Tenant Manager.
TRC-0325
Multi-Tenant Redis Host Required
MULTI_TENANT_REDIS_HOST must be set when MULTI_TENANT_ENABLED=true. The shared Redis Pub/Sub host is required for tenant lifecycle events.
TRC-0326
Plugin Auth Required for Multi-Tenant
MULTI_TENANT_ENABLED=true requires PLUGIN_AUTH_ENABLED=true. Enable plugin authentication and restart the service.
TRC-0327
API-Key-Only Validation Incompatible with Multi-Tenant
MULTI_TENANT_ENABLED=true is incompatible with API_KEY_ENABLED_ONLY_VALIDATION=true. Choose one mode and restart the service.
The instance has reached its per-pod tenant cap and cannot serve this tenant right now. The response includes a Retry-After header — clients should back off and retry. The cap auto-resets as the LRU pool evicts cold tenants.
When the JWT is missing, malformed, expired, or has no tenantId claim, multi-tenant deployments return HTTP 401 with "code": "Unauthenticated" — the same code emitted for a missing API key in single-tenant mode. No separate TRC code is emitted for tenant authentication failures.