Skip to content

Commit 4d2d035

Browse files
committed
log file buffer
1 parent 6e07969 commit 4d2d035

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ const handler = async (event) => {
1414

1515
// Validate JPEG buffer
1616
if (fileBuffer[0] !== 0xff || fileBuffer[1] !== 0xd8) {
17-
throw new Error('Invalid JPEG file. SOI marker not found.');
17+
throw new Error(
18+
`Invalid JPEG file. SOI marker not found. ${fileBuffer[0]}`
19+
);
1820
}
1921

2022
// Decode the JPEG to get raw pixel data

0 commit comments

Comments
 (0)