forgot return on invalid json

This commit is contained in:
Manuel Nuñez 2018-01-29 22:04:45 -03:00 committed by GitHub
parent 1aff82242a
commit 038abb7c3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

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