improve logging for parse errors

This commit is contained in:
ansuz 2020-03-27 15:15:54 -04:00
parent 3f86b6141e
commit 64b0879984

View file

@ -43,7 +43,10 @@ const tryParse = function (Env, str) {
try {
return JSON.parse(str);
} catch (err) {
Env.Log.error('HK_PARSE_ERROR', err);
Env.Log.error('HK_PARSE_ERROR', {
message: err && err.name,
input: str,
});
}
};