feat(contrib/jackc/pgx.v5): Add WithErrCheck option#3627
Conversation
This allows ignoring certain errors so that the spans do not show up as errors later.
There was a problem hiding this comment.
Hey @ryanslade , thank you for your contribution!
Can you add a few simple test cases for this feature?
Thanks!
Co-authored-by: Mikayla Toffler <[email protected]>
|
@mtoffl01 Thanks for taking a look, I think I've covered all your comments |
|
@mtoffl01 Would you mind taking a look at this? I think it's good to go 🙇 |
|
Hey @ryanslade Thanks for the PR, it seems good to me. I changed I will wait for the CI to run before merging |
Amazing, thanks! |
|
Hi @ryanslade I've made some more changes in the test as it was failing. Turns out that the cancelled context does not trigger span creation as no query is executed (as the context is cancelled it makes sense) I changed the test here to run two queries that trigger errors and one of them is ignored. It will merge the PR with the updated test. |
|
@mtoffl01 @eliottness Do you know why this wasn't included in the v2.2.2 release? |
|
@ryanslade This landed on |
This allows ignoring certain errors so that the spans do not show up as errors later.
What does this PR do?
Motivation
Reviewer's Checklist
golangci-lint runlocally.Unsure? Have a question? Request a review!