Skip to content

Commit 043a4a5

Browse files
committed
chore: preserve cause in caught SyntaxError rethrow
1 parent 6c6273b commit 043a4a5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extensions/fal/video-generation-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ async function fetchFalJson(params: {
488488
return JSON.parse(buffer.toString("utf8")) as unknown;
489489
} catch (err) {
490490
if (err instanceof SyntaxError) {
491-
throw new Error(FAL_VIDEO_MALFORMED_RESPONSE);
491+
throw new Error(FAL_VIDEO_MALFORMED_RESPONSE, { cause: err });
492492
}
493493
throw err;
494494
}

0 commit comments

Comments
 (0)