tedious
tedious copied to clipboard
feat: add new error type for param validation
This should resolve #1557 create a new Error subclass (maybe called ParameterValidationError), have it inherit from whatever error class we currently use (that might be TypeError, but I'm not sure), and define the additional properties on that.
User will have access to the param name and param value information via both message and error properties.
Codecov Report
Merging #1566 (f0ec70b) into master (4f3e210) will increase coverage by
0.00%
. The diff coverage is55.55%
.
:exclamation: Current head f0ec70b differs from pull request most recent head bf2b891. Consider uploading reports for the commit bf2b891 to get more accurate results
@@ Coverage Diff @@
## master #1566 +/- ##
=======================================
Coverage 80.45% 80.46%
=======================================
Files 92 92
Lines 4692 4699 +7
Branches 871 871
=======================================
+ Hits 3775 3781 +6
- Misses 644 645 +1
Partials 273 273
Files Changed | Coverage Δ | |
---|---|---|
src/request.ts | 84.48% <0.00%> (ø) |
|
src/connection.ts | 64.67% <30.00%> (-0.07%) |
:arrow_down: |
src/bulk-load.ts | 85.52% <100.00%> (+0.09%) |
:arrow_up: |
src/errors.ts | 100.00% <100.00%> (ø) |
@arthurschreiber , do we need to worry about this new parameter validation error will review some sensitive information that user may insert within their column, since we are expose the parameter values via this error?
Create a new PR for test these error related, then use the test test against this current changes within this PR.