node/multiClient: Add node address to errors #1428

Merged
fyrchik merged 1 commit from achuprov/frostfs-node:feat/multiClient_node_address into master 2024-10-15 14:05:34 +00:00

View file

@ -169,15 +169,16 @@ func (x *multiClient) iterateClients(ctx context.Context, f func(clientcore.Clie
var siErr *objectSDK.SplitInfoError var siErr *objectSDK.SplitInfoError
var eiErr *objectSDK.ECInfoError var eiErr *objectSDK.ECInfoError
if err != nil {
err = fmt.Errorf("client connection error at %v: %w", addr, err)
x.ReportError(err)
}
success := err == nil || errors.Is(err, context.Canceled) || errors.As(err, &siErr) || errors.As(err, &eiErr) success := err == nil || errors.Is(err, context.Canceled) || errors.As(err, &siErr) || errors.As(err, &eiErr)
if success || firstErr == nil || errors.Is(firstErr, errRecentlyFailed) { if success || firstErr == nil || errors.Is(firstErr, errRecentlyFailed) {
firstErr = err firstErr = err
} }
if err != nil {
x.ReportError(err)
}
return success return success
}) })