Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnableToReadMessage = errors.New("failed to read message body") ErrUnableToParseJSON = errors.New("failed to parse json body") )
View Source
var ( // Generic Errors ErrInternalServer = errors.New("internal error") ErrInvalidBody = errors.New("invalid request body") ErrNotFound = errors.New("not found") // Bundle-Specific ErrBundleNotFound = errors.New("bundle not found") ErrDeleteBundleForbidden = errors.New("cannot delete a published bundle") ErrBundleAlreadyExists = errors.New("bundle already exists") ErrInvalidBundleState = errors.New("invalid bundle state") ErrMissingBundleID = errors.New("missing bundle ID") ErrInvalidBundleReference = errors.New("invalid bundle reference") // Validation ErrMissingParameters = errors.New("missing required parameters in request") ErrInvalidQueryParameter = errors.New("invalid query parameter") ErrTooManyQueryParameters = errors.New("too many query parameters provided") // State errors ErrExpectedStateOfCreated = errors.New("expected bundle state to be 'created'") ErrExpectedStateOfApproved = errors.New("expected bundle state to be 'approved'") )
Core errors for dis-bundle-api
View Source
var BadRequestMap = map[error]bool{ ErrInvalidBody: true, ErrMissingParameters: true, ErrInvalidQueryParameter: true, ErrTooManyQueryParameters: true, ErrMissingBundleID: true, ErrInvalidBundleReference: true, ErrInvalidBundleState: true, }
View Source
var ConflictRequestMap = map[error]bool{ ErrBundleAlreadyExists: true, }
View Source
var ForbiddenMap = map[error]bool{ ErrDeleteBundleForbidden: true, ErrExpectedStateOfCreated: true, }
View Source
var NotFoundMap = map[error]bool{ ErrBundleNotFound: true, }
Grouping for error response handling
Functions ¶
This section is empty.
Types ¶
type ErrInvalidPatch ¶
type ErrInvalidPatch struct {
Msg string
}
Custom error types for common HTTP cases
func (ErrInvalidPatch) Error ¶
func (e ErrInvalidPatch) Error() string
Click to show internal directories.
Click to hide internal directories.