Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix potential panic in IsRecoverable
The way `unrecoverableError` wraps an error can lead to potential panics. In `IsRecoverable`, an `unrecoverableError` is passed to `errors.Is` without an embedded error. This is problematic because any error type that implements the `Is` interface and expects to be able to call `Error()` will trigger a panic due to the embedded error being `nil`. To fix this, we can implement `Error()` on `unrecoverableError` and handle the case where the embedded error is nil.
- Loading branch information