We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3adc92 commit cdbaa99Copy full SHA for cdbaa99
1 file changed
src/db/snapshot.ts
@@ -131,7 +131,7 @@ export async function importQuestions(file: File): Promise<ImportResult> {
131
raw = JSON.parse(text)
132
if (!Array.isArray(raw)) throw new Error('Expected a JSON array')
133
} catch (e) {
134
- throw new Error(`Invalid JSON: ${(e as Error).message}`)
+ throw new Error(`Invalid JSON: ${(e as Error).message}`, { cause: e })
135
}
136
137
const result: ImportResult = { imported: 0, skipped: 0, errors: [] }
0 commit comments