Docs

Request traces: why did this request fail?

Every request carries a trace id from the SDK through the gateway, the engines and SQL. When one is refused or fails, Sovaria records which check said no and why, and explains it.

Updated Oct 17, 2026Open in console

A request passes several checks before it reaches your data: sign-in, the caller's access to the project, their team role, rate limits, app attestation, plan limits, Guard policies, and in the database, row-level security and privileges. When one of them says no — or a service fails — Monitor › Request traces shows which one, the reason, and what to do.

refusalrefusalSDKtraceparent onevery callGatewaythe check thatrefused itEngineGuard, SQL, rowsecurityEchowhy + what to do

The trace id

The SDKs send a W3C traceparent with every call (all retries of one call share it) and put the trace id on errors; every response also carries it as X-Request-ID.

try {
  await sov.data.sql('insert into orders (total) values ($1)', [42])
} catch (e) {
  if (e instanceof SovariaError) {
    console.log(e.traceId)            // 4bf92f3577b34da6a3ce929d0e0e4736
    const why = await sov.api.traces.get({ traceId: e.traceId! })   // project team only
    why.explanation  // { verdict: 'denied', by: 'Guard policy', reason: "Guard denied INSERT on 'orders' …", hint: '…' }
  }
}

What it can tell you

Refused byMeansWhat to do
Sign-inNo token, or an expired, revoked or wrong-project token or key.Sign in again; check the project URL and key.
Team roleYour organization role lacks the permission.An owner grants it in Organization › Roles.
Rate limit / plan quotaToo many requests, or the plan's quota is used up.Wait for Retry-After; see Plan & usage.
App attestationAttestation is enforced and the app sent no valid token.Integrate App Check / App Attest, or use a debug token.
Guard policyAn access policy refused the action.Simulate the user, table and action under Policies.
Row-level securityA row policy rejected the row.Check the policy's USING / WITH CHECK, and who owns the row.
Database privilegesThe app role has no privilege on that object.Grant it in a migration or set the table's access preset.
Team-only APIApp users and the anon key can't do this.Call it from your server or a function with the service key.
  • Refusals (401, 403, 409, 422, 429) and failures (5xx) are recorded; successful requests are not stored.
  • Only refusals of signed-in callers of your project are stored for it — anonymous noise never lands in your traces.
  • Only your project team can read its traces (not app users or the anon key), and another project's trace id answers like one that doesn't exist.
  • Messages are stored as the caller saw them, with tokens and secrets scrubbed; request and response bodies are never stored.

How long traces are kept

FreeProUltraTeamEnterprise
Request trace history (why a request failed)1 day7 days14 days30 days30 days
Something unclear or missing on this page?Tell us