Skip to content

Commit d48fb7c

Browse files
author
Mrunal Chawda
committed
fix: correct undefined variable reference in error handler
Fix ReferenceError caused by referencing undefined variable 'e' instead of the correctly scoped 'error' variable in the catch block. Before: catch (error) { ... e.message } After: catch (error) { ... error.message } This bug prevented proper error responses when signature generation failed, causing the error handler itself to throw an exception. Hacktoberfest contribution
1 parent e33bffa commit d48fb7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/pages/api/sign-cloudinary-params.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default async function handler(req, res) {
1313
});
1414
} catch (error) {
1515
res.status(500).json({
16-
error: e.message,
16+
error: error.message,
1717
});
1818
}
1919
}

0 commit comments

Comments
 (0)