Browse Source

improve logging for parse errors

master
ansuz 9 months ago
parent
commit
64b0879984
1 changed files with 4 additions and 1 deletions
  1. 5
      lib/hk-util.js

5
lib/hk-util.js

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

Loading…
Cancel
Save