We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5481e50 commit d9f20d7Copy full SHA for d9f20d7
error.go
@@ -85,6 +85,10 @@ func (o OopsError) Unwrap() error {
85
// Is checks if this error matches the target error.
86
// This method implements the errors.Is interface for error comparison.
87
func (o OopsError) Is(err error) bool {
88
+ if _, ok := err.(OopsError); ok {
89
+ return true
90
+ }
91
+
92
return errors.Is(o.err, err)
93
}
94
error_test.go
@@ -17,6 +17,9 @@ func TestErrorsIs(t *testing.T) {
17
err = Wrap(fs.ErrExist)
18
is.ErrorIs(err, fs.ErrExist)
19
20
+ err = Wrap(fs.ErrExist)
21
+ is.ErrorIs(err, err)
22
23
err = Wrapf(fs.ErrExist, "Error: %w", assert.AnError)
24
25
0 commit comments