Errors

DSAR-PS-1001: PERSISTENCE_TENANT_SCOPE_MISSING

Meaning

A persistence operation was attempted without the required tenant scope context.

Probable Causes

  • The request pipeline did not set a tenant ID before invoking persistence queries.
  • Middleware that injects tenant scope was bypassed or misconfigured.
  • A background job or internal service call omitted the tenant context.

How to Fix

  1. Ensure all persistence calls are wrapped with withTenant(tenantId).
  2. Verify tenant resolution middleware is active in the request pipeline.
  3. For background jobs, explicitly provide the tenant ID from the job payload.

Retryable

No. The tenant scope must be provided before retrying.

Response Shape

Minimal Trigger Example