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

Propagate DataIntegrityError to the queryExecutionError middleware #672

Open
gajus opened this issue Feb 9, 2025 · 0 comments
Open

Propagate DataIntegrityError to the queryExecutionError middleware #672

gajus opened this issue Feb 9, 2025 · 0 comments

Comments

@gajus
Copy link
Owner

gajus commented Feb 9, 2025

Desired Behavior

I want to be able to catch DataIntegrityError and similar errors in the queryExecutionError middleware (or a new middleware)

https://github.com/gajus/slonik/blob/main/packages/slonik/src/connectionMethods/one.ts#L47

Motivation

It would make it easier to log errors with additional context when they happen.

Implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant