Skip to content

Commit 64083c1

Browse files
authored
Merge pull request avast#104 from jalaziz/fix-unrecoverable-error-panic
fix potential panic in IsRecoverable
2 parents a9809a7 + 6d7679d commit 64083c1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

retry.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,13 @@ type unrecoverableError struct {
302302
error
303303
}
304304

305+
func (e unrecoverableError) Error() string {
306+
if e.error == nil {
307+
return "unrecoverable error"
308+
}
309+
return e.error.Error()
310+
}
311+
305312
func (e unrecoverableError) Unwrap() error {
306313
return e.error
307314
}

0 commit comments

Comments
 (0)