Skip to content

Commit 77d1696

Browse files
rwblaireffigies
andauthored
Update src/files/json.ts
Co-authored-by: Chris Markiewicz <[email protected]>
1 parent a6a2ee2 commit 77d1696

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/files/json.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export async function loadJSON(file: BIDSFile): Promise<Record<string, unknown>>
2929
throw { key: 'JSON_INVALID' } // Raise syntax errors
3030
}
3131
if (Array.isArray(parsedText) || typeof parsedText !== "object") {
32-
throw { key: 'JSON_NOT_AN_OBJECT' }
32+
throw { key: 'JSON_NOT_AN_OBJECT', evidence: text.substring(0, 10) + (text.length > 10 ? '...' : '') }
3333
}
3434
return parsedText
3535
}

0 commit comments

Comments
 (0)