diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d505151714..cd341849ea0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Changelog for NeoFS Node - Session inactivity on object PUT request relay (#2460) - Missing connection retries on IR node startup when the first configured mainnet RPC node is not in sync (#2474) - Storage node no longer ignores unhealthy shards on startup (#2464) +- Processing of status errors returned by API client from NeoFS SDK RC-9 (#2465) ### Removed - Deprecated `morph.rpc_endpoint` SN and `morph.endpoint.client` IR config sections (#2400) diff --git a/cmd/neofs-cli/internal/common/exit.go b/cmd/neofs-cli/internal/common/exit.go index 1b616e08199..a7d25e1e203 100644 --- a/cmd/neofs-cli/internal/common/exit.go +++ b/cmd/neofs-cli/internal/common/exit.go @@ -28,15 +28,11 @@ func ExitOnErr(cmd *cobra.Command, errFmt string, err error) { aclDenied ) - var ( - code int - - internalErr = new(sdkstatus.ServerInternal) - accessErr = new(sdkstatus.ObjectAccessDenied) - ) + var code int + var accessErr = new(sdkstatus.ObjectAccessDenied) switch { - case errors.As(err, &internalErr): + case errors.Is(err, sdkstatus.ErrServerInternal): code = internal case errors.As(err, &accessErr): code = aclDenied