Skip to content

Commit c39183d

Browse files
Potential fix for code scanning alert no. 34: Information exposure through a stack trace
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 9198719 commit c39183d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/test/web-server/src/handleEsm.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ export const handleEsm = async (req, res) => {
6363
res.setHeader('Content-Type', 'application/javascript');
6464
return res.end(outJS);
6565
} catch (err) {
66-
console.error('ESM proxy error:', err);
66+
console.error('ESM proxy error:', err.stack);
6767
res.writeHead(500);
68-
return res.end(err.stack);
68+
return res.end("An internal server error occurred");
6969
}
7070
};

0 commit comments

Comments
 (0)