2022-02-28 10:56:46 +00:00
|
|
|
package client
|
|
|
|
|
2022-06-27 07:39:20 +00:00
|
|
|
import (
|
2022-08-05 07:56:49 +00:00
|
|
|
"fmt"
|
2022-06-27 07:39:20 +00:00
|
|
|
)
|
|
|
|
|
2022-08-05 07:56:49 +00:00
|
|
|
// returns error describing missing field with the given name.
|
|
|
|
func newErrMissingResponseField(name string) error {
|
|
|
|
return fmt.Errorf("missing %s field in the response", name)
|
|
|
|
}
|
|
|
|
|
|
|
|
// returns error describing invalid field (according to the NeoFS protocol)
|
|
|
|
// with the given name and format violation err.
|
|
|
|
func newErrInvalidResponseField(name string, err error) error {
|
|
|
|
return fmt.Errorf("invalid %s field in the response: %w", name, err)
|
|
|
|
}
|