pinojs/pino

Pino 8.17.0 breaks logging from catch in TypeScript

otowncaleb opened this issue · 3 comments

#1783 seems to have re-introduced #1115 as LogFn no longer accepts an object of type unknown, which is what TypeScript emits for caught errors.

image

Ah - I see now from the discussion in that PR that this is intentional. This is unfortunate as it constitutes a breaking change for those who previously logged this way.

From a DX perspective it's also somewhat surprising that Pino won't accept the error object as-is.

Thanks, will revert asap.

#1866

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.