From 038abb7c3bd4d8e8e065c7a2d9a602a3e6b29803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Nu=C3=B1ez?= Date: Mon, 29 Jan 2018 22:04:45 -0300 Subject: [PATCH] forgot return on invalid json --- lib/document_handler.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/document_handler.js b/lib/document_handler.js index 376aeb1..ff4d9bb 100644 --- a/lib/document_handler.js +++ b/lib/document_handler.js @@ -76,6 +76,7 @@ DocumentHandler.prototype.handlePost = function (request, response) { winston.verbose('error adding document'); response.writeHead(500, { 'content-type': 'application/json' }); response.end(JSON.stringify({ message: 'invalid JSON received.' })); + return; } }