diff --git a/README.md b/README.md index 23704fb6..2923408f 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,6 @@ Contains client for working with FrostFS. ```go var prmInit client.PrmInit prmInit.SetDefaultPrivateKey(key) // private key for request signing -prmInit.DisableFrostFSFailuresResolution() // disable erroneous status parsing var c client.Client c.Init(prmInit) @@ -78,7 +77,6 @@ these details to the user as well as retry an operation, possibly with different Status wire-format is extendable and each node can report any set of details it wants. The set of reserved status codes can be found in [FrostFS API](https://git.frostfs.info/TrueCloudLab/frostfs-api/src/branch/master/status/types.proto). -Use `client.PrmInit.DisableFrostFSFailuresResolution()` to avoid returning erroneous statuses as Go built-in errors. ### policy Contains helpers allowing conversion of placing policy from/to JSON representation diff --git a/client/client.go b/client/client.go index f1dacf1f..ba57b41d 100644 --- a/client/client.go +++ b/client/client.go @@ -161,6 +161,10 @@ func (x *PrmInit) SetDefaultPrivateKey(key ecdsa.PrivateKey) { x.key = key } +// Deprecated: method is no-op. Option is default. +func (x *PrmInit) ResolveFrostFSFailures() { +} + // DisableFrostFSFailuresResolution makes the Client to preserve failure statuses of the // FrostFS protocol only in resulting structure (see corresponding Res* docs). // These errors are returned from each protocol operation. By default, statuses diff --git a/client/netmap_test.go b/client/netmap_test.go index 4ec931e1..bce6b3af 100644 --- a/client/netmap_test.go +++ b/client/netmap_test.go @@ -67,6 +67,7 @@ func TestClient_NetMapSnapshot(t *testing.T) { var res *ResNetMapSnapshot var srv serverNetMap c := newClient(&srv) + c.prm.DisableFrostFSFailuresResolution() ctx := context.Background() // request signature @@ -84,7 +85,6 @@ func TestClient_NetMapSnapshot(t *testing.T) { srv.signResponse = true // status failure - c.prm.DisableFrostFSFailuresResolution() res, err = c.NetMapSnapshot(ctx, prm) require.NoError(t, err) assertStatusErr(t, res)