[#1535] morph: Unify client creation error messages

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-12-04 11:03:42 +03:00 committed by Evgenii Stratonikov
parent 281d65435e
commit 6c679d1535
5 changed files with 5 additions and 5 deletions

View file

@ -39,7 +39,7 @@ func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8,
staticClient, err := client.NewStatic(cli, contract, fee, ([]client.StaticClientOption)(*o)...) staticClient, err := client.NewStatic(cli, contract, fee, ([]client.StaticClientOption)(*o)...)
if err != nil { if err != nil {
return nil, fmt.Errorf("could not create static client of Balance contract: %w", err) return nil, fmt.Errorf("create 'balance' contract client: %w", err)
} }
return &Client{ return &Client{

View file

@ -48,7 +48,7 @@ func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8,
sc, err := client.NewStatic(cli, contract, fee, o.staticOpts...) sc, err := client.NewStatic(cli, contract, fee, o.staticOpts...)
if err != nil { if err != nil {
return nil, fmt.Errorf("can't create container static client: %w", err) return nil, fmt.Errorf("create 'container' contract client: %w", err)
} }
return &Client{client: sc}, nil return &Client{client: sc}, nil

View file

@ -35,7 +35,7 @@ func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8,
sc, err := client.NewStatic(cli, contract, fee, ([]client.StaticClientOption)(*o)...) sc, err := client.NewStatic(cli, contract, fee, ([]client.StaticClientOption)(*o)...)
if err != nil { if err != nil {
return nil, fmt.Errorf("could not create client of FrostFS contract: %w", err) return nil, fmt.Errorf("create 'frostfs' contract client: %w", err)
} }
return &Client{client: sc}, nil return &Client{client: sc}, nil

View file

@ -27,7 +27,7 @@ var _ frostfsidcore.SubjectProvider = (*Client)(nil)
func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8) (*Client, error) { func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8) (*Client, error) {
sc, err := client.NewStatic(cli, contract, fee, client.TryNotary(), client.AsAlphabet()) sc, err := client.NewStatic(cli, contract, fee, client.TryNotary(), client.AsAlphabet())
if err != nil { if err != nil {
return nil, fmt.Errorf("could not create client of FrostFS ID contract: %w", err) return nil, fmt.Errorf("create 'frostfsid' contract client: %w", err)
} }
return &Client{client: sc}, nil return &Client{client: sc}, nil

View file

@ -52,7 +52,7 @@ func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8,
sc, err := client.NewStatic(cli, contract, fee, ([]client.StaticClientOption)(*o)...) sc, err := client.NewStatic(cli, contract, fee, ([]client.StaticClientOption)(*o)...)
if err != nil { if err != nil {
return nil, fmt.Errorf("can't create netmap static client: %w", err) return nil, fmt.Errorf("create 'netmap' contract client: %w", err)
} }
return &Client{client: sc}, nil return &Client{client: sc}, nil