Files
threshold/internal/db/error.go
T
Michael Gaffney c9ad86c7ba Refactor: move error variables from host/static to db (#68)
The error variables defined in host/static are generic and can be reused
by other packages.
2020-05-20 16:23:22 -04:00

23 lines
734 B
Go

package db
import "errors"
// Errors returned from this package may be tested against these errors
// with errors.Is.
var (
// ErrInvalidPublicId indicates an invalid PublicId.
ErrInvalidPublicId = errors.New("invalid publicId")
// ErrInvalidParameter is returned by create and update methods if
// an attribute on a struct contains illegal or invalid values.
ErrInvalidParameter = errors.New("invalid parameter")
// ErrNotUnique is returned by create and update methods when a write
// to the repository resulted in a unique constraint violation.
ErrNotUnique = errors.New("unique constraint violation")
// ErrNilParameter is returned when a required parameter is nil.
ErrNilParameter = errors.New("nil parameter")
)