You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm using NeoFS Client to perform object get and object search requests with cancellation context. If context is cancelled by the caller's code, the rpc error: code = Canceled desc = context canceled error is returned from this method:
This error is expected since context was explicitly cancelled. However, I can't identify this error with if errors.Is(err, context.Canceled) because it's not a wrapped error.
Describe the solution you'd like
context.Canceled and context.DeadlineExceeded should be recognizable by NeoFS client and should be returned as wrapped errors from all clients methods that work with context. We're at Go 1.22, multierror wrapping is supported.
Describe alternatives you've considered
Leave it as is, but it leads to the following code on the caller's side:
// isContextCanceledErr returns whether error is a wrapped [context.Canceled].funcisContextCanceledErr(errerror) bool {
returnerrors.Is(err, context.Canceled) ||strings.Contains(err.Error(), "context canceled")
}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I'm using NeoFS Client to perform object get and object search requests with cancellation context. If context is cancelled by the caller's code, the
rpc error: code = Canceled desc = context canceled
error is returned from this method:neofs-sdk-go/client/object_search.go
Line 140 in 3d4a462
This error is expected since context was explicitly cancelled. However, I can't identify this error with
if errors.Is(err, context.Canceled)
because it's not a wrapped error.Describe the solution you'd like
context.Canceled
andcontext.DeadlineExceeded
should be recognizable by NeoFS client and should be returned as wrapped errors from all clients methods that work with context. We're at Go 1.22, multierror wrapping is supported.Describe alternatives you've considered
Leave it as is, but it leads to the following code on the caller's side:
The text was updated successfully, but these errors were encountered: