Closed intercept6 closed 1 month ago
It appears that errors.IsAny does not support multi-error. https://github.com/cockroachdb/errors/blob/c1cc1919cf999fb018fcd038852e969e3d5631cc/markers/markers.go#L152-L205
errors.Is supports multi-error. https://github.com/cockroachdb/errors/blob/c1cc1919cf999fb018fcd038852e969e3d5631cc/markers/markers.go#L44-L92
Perhaps the following equivalent code can be added to IsAny.
// Recursively try multi-error causes, if applicable. for _, me := range errbase.UnwrapMulti(c) { if Is(me, reference) { return true } }
This fix was recently merged: https://github.com/cockroachdb/errors/pull/140 and the latest release contains the fix.
It appears that errors.IsAny does not support multi-error. https://github.com/cockroachdb/errors/blob/c1cc1919cf999fb018fcd038852e969e3d5631cc/markers/markers.go#L152-L205
errors.Is supports multi-error. https://github.com/cockroachdb/errors/blob/c1cc1919cf999fb018fcd038852e969e3d5631cc/markers/markers.go#L44-L92
Perhaps the following equivalent code can be added to IsAny.