feat: allow specifying expected PG error codes in txRunner to reduce log volume#4885
feat: allow specifying expected PG error codes in txRunner to reduce log volume#4885huahuayu wants to merge 2 commits into
Conversation
|
@huahuayu is attempting to deploy a commit to the River Build Team Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughAdded an option to txRunner to recognize expected PostgreSQL error codes. When a transaction error matches one of these codes, logging is downgraded to Debug and a pass flag is set; otherwise it logs at Warn. Existing retry/backoff and not-found handling remain unchanged. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This PR addresses issue #3864 by allowing callers to specify a list of 'expected' PostgreSQL error codes.
Errors matching these codes will be logged at the DEBUG level instead of the WARN level, reducing log volume in distributed scenarios where certain database failures (e.g., unique violations or foreign key constraints during races) are anticipated.
Changes:
Fixes #3864