Skip to content

feat(dew.go): return the custom validate error wrapped with the ErrVa…#14

Merged
yottahmd merged 2 commits intogo-dew:mainfrom
MohammadBnei:feat/validate-error-wrapping
Nov 20, 2025
Merged

feat(dew.go): return the custom validate error wrapped with the ErrVa…#14
yottahmd merged 2 commits intogo-dew:mainfrom
MohammadBnei:feat/validate-error-wrapping

Conversation

@MohammadBnei
Copy link
Contributor

@MohammadBnei MohammadBnei commented Nov 20, 2025

@MohammadBnei
feat(dew.go): return the custom validate error wrapped with the ErrValidationFailed

I want to be able to use errors.Is with the returned validation error from the commands. The current implementation uses a %v in the validate error wrapping, removing the error's informations. Multiple error wrapping is possible since go 1.20 (https://go.dev/doc/go1.20#errors)

Copy link
Contributor

@yottahmd yottahmd left a comment

Choose a reason for hiding this comment

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

Thank you very much for the improvement!

@yottahmd yottahmd merged commit c150ca4 into go-dew:main Nov 20, 2025
1 check passed
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