code: Um identificador único e estável para o erro (formato: TRC-XXXX).
title: Um breve resumo do problema.
message: Orientação detalhada para resolver o erro.
Detalhes de erros a nível de campoPara problemas específicos de campos individuais, um objeto fields fornece contexto adicional.Exemplos:
{ "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" }}
Falhas de autenticação retornam "code": "Unauthenticated" (não é um código TRC) com HTTP 401. Esse é um identificador estável e bem conhecido em vez de um código TRC, então os clientes devem fazer match com a string literal.
Estes erros vêm do subsistema de contadores de uso que respalda a aplicação de limites de gasto. A maioria são retornados como respostas HTTP 500 Internal Server Error com o código TRC correspondente.
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.
Estes erros ocorrem durante a aplicação de limites em requisições de validação. A maioria são invariantes internas; as variantes voltadas ao usuário geralmente surgem por meio dos erros de Requisição de Validação (série TRC-0220).
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.
Estes códigos são retornados durante a inicialização do serviço ou por validações de construtor. Não são retornados em requisições de clientes, mas podem aparecer nos logs de inicialização.
Esses códigos são emitidos pelo endpoint operacional /readyz e pelo ciclo de vida do worker supervisor. Aparecem no campo error da resposta JSON do /readyz, não nas respostas dos endpoints /v1/*. Operadores dependem do código literal (não da mensagem) para alertas em dashboards.
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.
Esses códigos aparecem apenas na inicialização do serviço quando MULTI_TENANT_ENABLED=true e uma configuração obrigatória está ausente ou incompatível. Aparecem nos logs de inicialização (e impedem o serviço de iniciar) — nunca chegam aos consumidores da API /v1/*.
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.
Quando o JWT está ausente, malformado, expirado ou sem a claim tenantId, implantações multi-tenant retornam HTTP 401 com "code": "Unauthenticated" — o mesmo código emitido para API key ausente em modo single-tenant. Nenhum código TRC separado é emitido para falhas de autenticação de tenant.