You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, consider changing res._headers[...] with res.get(...).
Furthermore, In my opinion there is no need to wrap the JSON.parse with try-catch because I don't see a reason to use a json content-type and not returning a json object in the body...
The text was updated successfully, but these errors were encountered:
https://github.com/bithavoc/express-winston/blob/master/index.js#L201
res._headers['content-type']
might be undefined.indexOf
throws an error.The code should be replaced with:
Or in order to catch content-types that contain json\jsonp but not lalalajsonlalala:
Also, consider changing
res._headers[...]
withres.get(...)
.Furthermore, In my opinion there is no need to wrap the
JSON.parse
withtry-catch
because I don't see a reason to use a json content-type and not returning a json object in the body...The text was updated successfully, but these errors were encountered: