Skip to content
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: add new error type for param validation #1566

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MichaelSun90
Copy link
Contributor

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
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Merging #1566 (f0ec70b) into master (4f3e210) will increase coverage by 0.00%.
The diff coverage is 55.55%.

❗ 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%) ⬇️
src/bulk-load.ts 85.52% <100.00%> (+0.09%) ⬆️
src/errors.ts 100.00% <100.00%> (ø)

@MichaelSun90 MichaelSun90 changed the title feature: add new error type for param validation feat: add new error type for param validation Aug 8, 2023
@MichaelSun90
Copy link
Contributor Author

@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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant