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(validate): provide validate error in data #594

Merged
merged 5 commits into from
Dec 7, 2023

Conversation

atinux
Copy link
Member

@atinux atinux commented Dec 7, 2023

πŸ”— Linked issue

❓ Type of change

  • πŸ‘Œ Enhancement (improving an existing functionality like performance)

πŸ“š Description

We were not forwarding the error from zod to the data property, making it impossible to get back the errors/issues from it.

Before:
CleanShot 2023-12-07 at 11 50 19

After:
CleanShot 2023-12-07 at 11 50 41

@atinux atinux requested a review from pi0 December 7, 2023 10:51
@atinux
Copy link
Member Author

atinux commented Dec 7, 2023

I guess we could also improve the error message but might be a breaking change so I kept it this way.

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests βœ…

Comparison is base (afc4183) 84.43% compared to head (c584e6a) 84.44%.

❗ Current head c584e6a differs from pull request most recent head 71b1634. Consider uploading reports for the commit 71b1634 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #594      +/-   ##
==========================================
+ Coverage   84.43%   84.44%   +0.01%     
==========================================
  Files          32       32              
  Lines        3752     3755       +3     
  Branches      559      559              
==========================================
+ Hits         3168     3171       +3     
  Misses        584      584              

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

src/utils/internal/validate.ts Outdated Show resolved Hide resolved
src/utils/internal/validate.ts Outdated Show resolved Hide resolved
@pi0 pi0 changed the title feat(validation): improve validation error feat(validate): provide validate error in data Dec 7, 2023
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’―

@pi0 pi0 merged commit 18b8ec1 into main Dec 7, 2023
4 checks passed
@pi0 pi0 deleted the feat/improved-validation-errors branch December 7, 2023 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants