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; } }