Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix potential panic in IsRecoverable #104

Merged
merged 1 commit into from
Nov 14, 2023

Commits on Nov 14, 2023

  1. 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.
    jalaziz committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    6d7679d View commit details
    Browse the repository at this point in the history