mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-31 07:21:33 -07:00
fix(history-db): treat SQLITE_CANTOPEN as readonly WAL retry error
- Add `sqlite_cantopen` and `unable to open database file` to `isReadonlyWalRetryError` checks - Cover `SQLITE_CANTOPEN` case in test
This commit is contained in:
@@ -58,7 +58,9 @@ export function isReadonlyWalRetryError(error: unknown, dbPath: string): boolean
|
||||
return (
|
||||
text.includes('readonly') ||
|
||||
text.includes('read-only') ||
|
||||
text.includes('attempt to write a readonly database')
|
||||
text.includes('attempt to write a readonly database') ||
|
||||
text.includes('sqlite_cantopen') ||
|
||||
text.includes('unable to open database file')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user