2
0
mirror of https://github.com/hibiken/asynq.git synced 2026-04-25 03:15:51 +08:00

wrap all fmt.Errorf errors (#1047)

Users need to be able to match with `errors.Is()` also on external
errors, for example `context.Canceled`.
This commit is contained in:
Benjamin Grosse
2025-11-04 15:25:47 +00:00
committed by GitHub
parent a889ef0b08
commit d64f0b7ed0
6 changed files with 31 additions and 31 deletions

View File

@@ -123,7 +123,7 @@ func ExampleResultWriter() {
res := []byte("task result data")
n, err := task.ResultWriter().Write(res) // implements io.Writer
if err != nil {
return fmt.Errorf("failed to write task result: %v", err)
return fmt.Errorf("failed to write task result: %w", err)
}
log.Printf(" %d bytes written", n)
return nil