Skip to content

system_identity_switch_denied

This action isn’t allowed. Please contact an administrator if you believe this is a mistake.

AccessDeniedError: a handler or hook called ctx.queryAs/ctx.writeAs with a SYSTEM identity without being an r.systemScope() handler, a job, or declaring escapeHatch: { reason }.

Declare escapeHatch: { reason: "..." } on the write or query handler (or on the r.hook(...) call, if the switch happens inside a hook), or move the logic into an r.systemScope() feature or a job.