Skip to content

feat(validate): provide validate error in data#594

Merged
pi0 merged 5 commits intomainfrom
feat/improved-validation-errors
Dec 7, 2023
Merged

feat(validate): provide validate error in data#594
pi0 merged 5 commits intomainfrom
feat/improved-validation-errors

Conversation

@atinux
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor 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.

@codecov
Copy link
Copy Markdown

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.

Comment thread src/utils/internal/validate.ts Outdated
Comment thread src/utils/internal/validate.ts Outdated
@pi0 pi0 changed the title feat(validation): improve validation error feat(validate): provide validate error in data Dec 7, 2023
Copy link
Copy Markdown
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.

💯

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