Skip to main content

Function: isReadOnlyDatabaseError()

isReadOnlyDatabaseError(error): boolean

Defined in: Data/Core/Errors.ts:67

True when an error is SQLite refusing a write because the database is read-only.

This is a normal, expected condition rather than a fault: a shipped v2 module is an immutable artifact, and on macOS (inside a .app) or Linux (inside a mounted AppImage) the whole resources directory is read-only. Callers that write opportunistically — search-index caches, for instance — should degrade quietly rather than fail the user's query.

Matches on both the driver's SQLITE_READONLY code and the message text, because better-sqlite3 surfaces the code while some wrappers only preserve the message.

Parameters

error

unknown

Returns

boolean