Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pino 8.17.0 breaks logging from catch in TypeScript #1865

Closed
castdin opened this issue Dec 14, 2023 · 3 comments · Fixed by #1866
Closed

Pino 8.17.0 breaks logging from catch in TypeScript #1865

castdin opened this issue Dec 14, 2023 · 3 comments · Fixed by #1866

Comments

@castdin
Copy link

castdin commented Dec 14, 2023

#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
@castdin
Copy link
Author

castdin commented Dec 14, 2023

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.

@mcollina
Copy link
Member

Thanks, will revert asap.

#1866

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants