From 50db9ce6df1a74914487a502e8105991d47cf449 Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Thu, 4 Jul 2019 13:07:32 +0200 Subject: [PATCH] log request body in case of error --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 1259777..7bc02a4 100644 --- a/index.js +++ b/index.js @@ -57,6 +57,7 @@ const server = http.createServer(async (req, res) => { ); } catch (e) { console.error(e); + if (body) console.error(body); } res.writeHead(201);