Documentation ¶
Overview ¶
Package errors provides errors reported to the user. These are mapped to a proto.Error by the API and sent to the user. All errors must implement the error interface and return a helpful error message. The message can be terse because it will be reported in context. For example, the RequestNotFound error message makes sense in response to "spinc status abc123" when "abc123" does not exist.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbError ¶
type DbError struct {
// contains filtered or unexported fields
}
Error represents a generic database error. This struct is not superfluous, it allows the API to distinguish the error type and return an appropriate proto.Error.
func NewDbError ¶
type ErrInvalidCreateRequest ¶
type ErrInvalidCreateRequest struct {
Message string
}
func (ErrInvalidCreateRequest) Error ¶
func (e ErrInvalidCreateRequest) Error() string
type ErrInvalidState ¶
type ErrInvalidState struct {
// contains filtered or unexported fields
}
func NewErrInvalidState ¶
func NewErrInvalidState(expectedState, actualState string) ErrInvalidState
func (ErrInvalidState) Error ¶
func (e ErrInvalidState) Error() string
type JobNotFound ¶
func (JobNotFound) Error ¶
func (e JobNotFound) Error() string
type RequestNotFound ¶
type RequestNotFound struct {
RequestId string
}
func (RequestNotFound) Error ¶
func (e RequestNotFound) Error() string
type ValidationError ¶
type ValidationError struct {
Message string
}
func (ValidationError) Error ¶
func (e ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.