Skip to content

Commit

Permalink
Merge pull request #104 from jalaziz/fix-unrecoverable-error-panic
Browse files Browse the repository at this point in the history
fix potential panic in IsRecoverable
  • Loading branch information
JaSei committed Nov 14, 2023
2 parents a9809a7 + 6d7679d commit 64083c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions retry.go
Expand Up @@ -302,6 +302,13 @@ type unrecoverableError struct {
error
}

func (e unrecoverableError) Error() string {
if e.error == nil {
return "unrecoverable error"
}
return e.error.Error()
}

func (e unrecoverableError) Unwrap() error {
return e.error
}
Expand Down

0 comments on commit 64083c1

Please sign in to comment.