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
Pino would not log original ctx.throw and log INFO request complete with req and res objects, but no error itself.
Q:
how do I add error to this event?
alternatively, if I log the error myself with ctx.logger.error, how to enrich it with other meta data i.e. timestamp, context etc.?
thank you!
UPDATE to (2)
Apparently, if logged ctx.logger.error({ err }) it would add req and more meta and context around an error.
Was it documented somewhere that I missed and is worth documenting?
Would it be the "proper" way to log errors in custom error handler?
The text was updated successfully, but these errors were encountered:
Hi,
let's say I throw an error in the route handler:
and handle the error with a global middleware:
Pino would not log original
ctx.throw
and logINFO request complete
withreq
andres
objects, but no error itself.Q:
ctx.logger.error
, how to enrich it with other meta data i.e. timestamp, context etc.?thank you!
UPDATE to (2)
Apparently, if logged
ctx.logger.error({ err })
it would addreq
and more meta and context around an error.Was it documented somewhere that I missed and is worth documenting?
Would it be the "proper" way to log errors in custom error handler?
The text was updated successfully, but these errors were encountered: