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

Feature Request: Showing query in error.message needs to be configurable #5497

Open
apnerve opened this issue Feb 22, 2023 · 0 comments
Open

Comments

@apnerve
Copy link

apnerve commented Feb 22, 2023

err.message =
formatQuery(queryObject.sql, queryObject.bindings, undefined, client) +
' - ' +
err.message;

We have a use case where logging the query makes sense but showing it in the error message doesn't. In order to achieve that we are having to resort to removing the query based on the pattern ' - ' but that looks like an ugly hack. It would be great if this can be configured so if one doesn't need the query in the error.message, they can configure it

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

No branches or pull requests

1 participant