Skip to content

Commit 010e151

Browse files
authored
Fix/errors is panic (#79)
* chore: update dependabot config * fix(errors.Is): fix panic
1 parent 033a839 commit 010e151

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

error.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package oops
33

44
import (
55
"encoding/json"
6+
"errors"
67
"fmt"
78
"log/slog"
89
"net/http"
@@ -84,7 +85,7 @@ func (o OopsError) Unwrap() error {
8485
// Is checks if this error matches the target error.
8586
// This method implements the errors.Is interface for error comparison.
8687
func (c OopsError) Is(err error) bool {
87-
return c.err == err
88+
return errors.Is(c.err, err)
8889
}
8990

9091
// Error returns the error message without additional context.

0 commit comments

Comments
 (0)