From bd14e57f04bf3a5c53b67f729afa073a380aebfe Mon Sep 17 00:00:00 2001 From: Vinarnt Date: Mon, 23 Aug 2021 14:41:58 +0200 Subject: [PATCH] Return exception message as response on error --- .gitignore | 1 + index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2ccbe46..3d3c4bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /node_modules/ +.vscode/launch.json diff --git a/index.js b/index.js index 8a000c9..a4d3c04 100644 --- a/index.js +++ b/index.js @@ -50,7 +50,7 @@ app.all('*', function (req, res) { console.log('') res.writeHead(400, { 'Content-Type': 'text/plain' }) - res.end() + res.end(ex.message) } })