tedious icon indicating copy to clipboard operation
tedious copied to clipboard

feat: add new error type for param validation

Open MichaelSun90 opened this issue 1 year ago • 3 comments

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.

MichaelSun90 avatar Aug 04 '23 22:08 MichaelSun90

Codecov Report

Merging #1566 (f0ec70b) into master (4f3e210) will increase coverage by 0.00%. The diff coverage is 55.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%> (ø)

codecov[bot] avatar Aug 04 '23 22:08 codecov[bot]

@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?

MichaelSun90 avatar Aug 08 '23 17:08 MichaelSun90

Create a new PR for test these error related, then use the test test against this current changes within this PR.

MichaelSun90 avatar Sep 06 '23 20:09 MichaelSun90