Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrAlreadyExists = errors.New("Already exists")
var ErrNotFound = errors.New("Not found")
Client APIs should raise ErrNotFound to indicate that a resource requested in a get/read does not exist.
Functions ¶
func Cast ¶
Cast casts Multi error (if any) to error and returns it if err is already nil or not Multi type Cast will just return it the returned error is safe to use in any std error evaluations, such as if err == nil, etc.
func GetHttpStatusCode ¶
func NewInitError ¶
Types ¶
type ClientInitError ¶
ClientInitError is a custom Go error type to indicate that initializing a client connection to a service failed.
func (ClientInitError) Error ¶
func (c ClientInitError) Error() string
type Multi ¶
type Multi struct {
// contains filtered or unexported fields
}
Multi error implementation
func (*Multi) AddFmt ¶
AddFmt adds a new formatted error if err is not nil, it's a noop if err == nil & returns unchanged 'me' in this case
func (*Multi) AsError ¶
AsError returns error cast of Multi, the returned error is safe to use in any std error evaluations, such as if err == nil, etc. Functions returning error should always return Multi.AsError() instead of Multi directly