forked from TrueCloudLab/frostfs-api-go
service: change constant errors
This commit: * moves defined errors to a separate file; * renames ErrEmptyToken to ErrNilToken; * merges ErrZeroTTL and ErrIncorrectTTL into single ErrInvalidTTL.
This commit is contained in:
parent
e3cab218dc
commit
fc177c4ce3
6 changed files with 31 additions and 37 deletions
18
service/errors.go
Normal file
18
service/errors.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
package service
|
||||
|
||||
import "github.com/nspcc-dev/neofs-api-go/internal"
|
||||
|
||||
// ErrNilToken is returned by functions that expect a non-nil token argument, but received nil.
|
||||
const ErrNilToken = internal.Error("token is nil")
|
||||
|
||||
// ErrInvalidTTL means that the TTL value does not satisfy a specific criterion.
|
||||
const ErrInvalidTTL = internal.Error("invalid TTL value")
|
||||
|
||||
// ErrInvalidPublicKeyBytes means that the public key could not be unmarshaled.
|
||||
const ErrInvalidPublicKeyBytes = internal.Error("cannot load public key")
|
||||
|
||||
// ErrCannotFindOwner is raised when signatures empty in GetOwner.
|
||||
const ErrCannotFindOwner = internal.Error("cannot find owner public key")
|
||||
|
||||
// ErrWrongOwner is raised when passed OwnerID not equal to present PublicKey
|
||||
const ErrWrongOwner = internal.Error("wrong owner")
|
Loading…
Add table
Add a link
Reference in a new issue