-
Notifications
You must be signed in to change notification settings - Fork 439
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
feat: provide better error messages when input param is invalid #1603
feat: provide better error messages when input param is invalid #1603
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1603 +/- ##
==========================================
- Coverage 78.97% 78.28% -0.70%
==========================================
Files 93 93
Lines 4871 4876 +5
Branches 937 937
==========================================
- Hits 3847 3817 -30
- Misses 718 761 +43
+ Partials 306 298 -8 ☔ View full report in Codecov by Sentry. |
Hi @jtomaszewski, sorry for the long silence period on this PR. I have worked with @arthurschreiber , and made some change to this PR, and fix the failing tests. Please give a look, see if you ok with the changes. |
Awesome work, it looks great to me :) |
🎉 This PR is included in version 18.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Currently when I run a DB procedure that requires a TVP input that has many columns and rows, if at least one value of that is incorrect (e.g. fails with a
The number NaN cannot be converted to a BigInt because it is not an integer
error), I only get that error message - without highlighting which param value is the faulty one. It looks like this:Finding the cause is very difficult then, I basically have to check every value 1-by-1 manually to see which one is wrong... or put a
debugger
into the tedious source code.This PR a bit improves that behaviour. If an error is thrown during the
generateParameterData
call, the error is wrapped, and its' message is kept, but also enhanced with information about which param is the wrong one.P.S. I can add some tests or change the implementation if you want, just let me know if you're okay with the general idea of doing this.