{"record":{"id":"5772c5a5e85e3a23","repo":"diegosouzapw/OmniRoute","slug":"quotasnapshots-skipping-save-quota-snapshots-ta","errorCode":null,"errorMessage":"[QuotaSnapshots] Skipping save: quota_snapshots table not found. Awaiting migration.","messagePattern":"\\[QuotaSnapshots\\] Skipping save: quota_snapshots table not found\\. Awaiting migration\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/db/quotaSnapshots.ts","lineNumber":41,"sourceCode":"    db.prepare(\n      `INSERT INTO quota_snapshots\n       (provider, connection_id, window_key, remaining_percentage, is_exhausted,\n        next_reset_at, window_duration_ms, raw_data, created_at)\n       VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`\n    ).run(\n      snapshot.provider,\n      snapshot.connection_id,\n      snapshot.window_key,\n      snapshot.remaining_percentage,\n      snapshot.is_exhausted,\n      snapshot.next_reset_at,\n      snapshot.window_duration_ms,\n      snapshot.raw_data,\n      now\n    );\n  } catch (err: any) {\n    if (err?.message?.includes(\"no such table\")) {\n      console.warn(\n        \"[QuotaSnapshots] Skipping save: quota_snapshots table not found. Awaiting migration.\"\n      );\n      return;\n    }\n    throw err;\n  }\n}\n\nexport function getQuotaSnapshots(opts: {\n  provider?: string;\n  connectionId?: string;\n  since: string;\n  until?: string;\n}): QuotaSnapshotRow[] {\n  const db = getDbInstance() as unknown as DbLike;\n  const conditions: string[] = [\"created_at >= ?\"];\n  const params: unknown[] = [opts.since];\n","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/db/quotaSnapshots.ts#L23-L59","documentation":"Error \"[QuotaSnapshots] Skipping save: quota_snapshots table not found. Awaiting migration.\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/db/quotaSnapshots.ts:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}