Skip to content

fix: error wrap instead of including as string#508

Open
mateuszkrasucki wants to merge 1 commit intohyperjumptech:masterfrom
mateuszkrasucki:wrap-errors
Open

fix: error wrap instead of including as string#508
mateuszkrasucki wants to merge 1 commit intohyperjumptech:masterfrom
mateuszkrasucki:wrap-errors

Conversation

@mateuszkrasucki
Copy link

  • Error wrapping with %w introduced in Go 1.13, allows to add context to errors while preserving the original error for inspection via errors.Is or errors.As.
  • Grule was previously building errors including original error with %v making it impossible to check for specific error types upstream.

- Error wrapping with `%w` introduced in Go 1.13, allows to add context
  to errors while preserving the original error for inspection via
  errors.Is or errors.As.
- Grule was previously building errors including original error with
  `%v` making it impossible to check for specific error types upstream.
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.

1 participant