forked from TrueCloudLab/frostfs-node
[#1558] morph/client: Remove "could not"/"can't"/"failed to" from error messages
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
91d9dc2676
commit
7151c71d51
19 changed files with 55 additions and 55 deletions
|
@ -59,7 +59,7 @@ func irKeysFromStackItem(stack []stackitem.Item, method string) (keys.PublicKeys
|
|||
|
||||
irs, err := client.ArrayFromStackItem(stack[0])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not get stack item array from stack item (%s): %w", method, err)
|
||||
return nil, fmt.Errorf("get stack item array from stack item (%s): %w", method, err)
|
||||
}
|
||||
|
||||
irKeys := make(keys.PublicKeys, len(irs))
|
||||
|
@ -79,7 +79,7 @@ const irNodeFixedPrmNumber = 1
|
|||
func irKeyFromStackItem(prm stackitem.Item) (*keys.PublicKey, error) {
|
||||
prms, err := client.ArrayFromStackItem(prm)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not get stack item array (IRNode): %w", err)
|
||||
return nil, fmt.Errorf("get stack item array (IRNode): %w", err)
|
||||
} else if ln := len(prms); ln != irNodeFixedPrmNumber {
|
||||
return nil, fmt.Errorf(
|
||||
"unexpected stack item count (IRNode): expected %d, has %d",
|
||||
|
@ -90,7 +90,7 @@ func irKeyFromStackItem(prm stackitem.Item) (*keys.PublicKey, error) {
|
|||
|
||||
byteKey, err := client.BytesFromStackItem(prms[0])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not parse bytes from stack item (IRNode): %w", err)
|
||||
return nil, fmt.Errorf("parse bytes from stack item (IRNode): %w", err)
|
||||
}
|
||||
|
||||
return keys.NewPublicKeyFromBytes(byteKey, elliptic.P256())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue