SQLITE_AUTH_USER
SQLiteERRORNotableAuthorisationofficial confidence

Authorisation denied by user

Production Risk

Medium — SQL operation denied by application-level authorisation.

What this means

SQLITE_AUTH_USER (279) is a sub-code of SQLITE_AUTH returned specifically when the authoriser callback denies access due to a user-level permission check (as opposed to a schema-level check).

Why it happens
  1. 1Authoriser callback registered via sqlite3_set_authorizer() returned SQLITE_DENY for a user-specific operation.
  2. 2Multi-user SQLite extension (e.g., user_version-based auth) denied the operation.
How to reproduce

Any SQL operation when a custom authoriser callback denies it with user context.

trigger — this will error
trigger — this will error
# In C, register an authoriser:
# sqlite3_set_authorizer(db, myAuth, NULL);
# If myAuth() returns SQLITE_DENY with user context → SQLITE_AUTH_USER

expected output

sqlite3.OperationalError: not authorized

Fix 1

Fix 2

Sources
Official documentation ↗

sqlite3.h — SQLITE_AUTH_USER = 279

sqlite3_set_authorizer()

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All SQLite errors