feat: 🎸 Handle corrupted sqlite DB (#2976)
* feat: 🎸 Handle corrupted sqlite DB
This commit is contained in:
1 parent
cb8b21c10c
commit
dc026c44a1
2 files changed
+14
-4
No files matched your search
@@ -182,8 +182,8 @@ export default class SqliteHandler {
|
||||
// If we get an invalid list token, we'll delete the token and
|
||||
// clear the DB and try again without a token.
|
||||
if (
|
||||
err?.errors[0].status === 400 &&
|
||||
err?.errors[0].code === 'invalid list token'
|
||||
err?.errors?.[0].status === 400 &&
|
||||
err?.errors?.[0].code === 'invalid list token'
|
||||
) {
|
||||
await this.sqlite.deleteResource(type);
|
||||
// Delete all tokens of the same resource type so we don't keep clearing the DB.
|
||||
|
||||
Reference in new issue
Block a user