Select Git revision
-
Marc René Arns authoredMarc René Arns authored
errors.go 1.61 KiB
package wc
import (
"gitlab.com/golang-utils/errors"
)
var (
ErrNotFound = errors.Error("not found: %v")
ErrUnexpected = errors.Error("unexpected: %v")
ErrInvalidType = errors.Error("invalid type: %T (expected %T)")
ErrMissing = errors.Error("missing: %s")
ErrForbidden = errors.Error("forbidden: %s")
)
var (
ErrWrongContentType = errors.Error("wrong content type: %s (expected %s)")
ErrValidation = errors.Error("validation error: %w")
)
var (
ErrArgNotFound = errors.Error("argument with name %q could not be found")
ErrArgExists = errors.Error("argument with name %q already exists")
ErrArgMissing = errors.Error("missing argument %q of source %q")
ErrArgNotInRequest = errors.Error("argument %q of type %s not in request")
ErrArgUnknown = errors.Error("unknown argument %q given")
ErrArgInvalidType = errors.Error("invalid type for argument %s: %T (expected %T)")
)
var (
ErrPathArgNotRegistered = errors.Error("path argument %q from path string %q not registered")
ErrPathArgRegisteredWithWrongType = errors.Error("path argument %q from path string %q registered with wrong path type (%q)")
ErrPathArgRegisteredNotInPath = errors.Error("path argument %q registered, but not inside path string %q")
)
var (
ErrFormArg = errors.Error("form argument %q given")
)
var (
ErrClientRequest = errors.Error("error while making a request as a client: %w")
ErrFormArgsAndBody = errors.Error("form arguments (%#v) and a body can't be passed at the same time")
ErrBodyNotAllowedForMethod = errors.Error("transmitting a form for method %s is not allowed")
)