Skip to content

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

Merged
yohamta0 merged 2 commits into
go-dew:mainfrom
MohammadBnei:feat/validate-error-wrapping
Nov 20, 2025
Merged

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

Conversation

@MohammadBnei

@MohammadBnei MohammadBnei commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

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

@yohamta0 yohamta0 left a comment

Copy link
Copy Markdown
Contributor

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!

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