escape quotes for logs

This commit is contained in:
Simon Martín 2017-12-12 12:58:31 +01:00
parent 8665caa3cb
commit 6481d14192

View File

@ -64,6 +64,8 @@ function setErrorHeader(err, statusCode, res) {
errorsLog.statusCode = statusCode || 200;
errorsLog.message = errorsLog.error[0];
// escape quotes for logs
errorsLog.message = errorsLog.message.replace(/"/g, "");
delete errorsLog.error;
res.set('X-SQLAPI-Errors', JSON.stringify(errorsLog));