Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrFromResponse ¶ added in v0.1.4
ErrFromResponse maps an HTTP response (with an error status code) to a (more or less) specific error type.
func IsValidationErrorResponse ¶ added in v0.2.37
func IsValidationErrorResponse(res *http.Response) (*commonsv2.ValidationErrors, bool)
Types ¶
type ErrBadRequest ¶ added in v0.2.37
ErrBadRequest represents the error of an invalid request to the server.
func (*ErrBadRequest) Error ¶ added in v0.2.37
func (e *ErrBadRequest) Error() string
type ErrNotFound ¶ added in v0.1.4
ErrNotFound represents the error of trying to access a resource that does not exist.
func (*ErrNotFound) Error ¶ added in v0.1.4
func (e *ErrNotFound) Error() string
type ErrPermissionDenied ¶ added in v0.1.4
ErrPermissionDenied represents the error of trying to access a resource that the currently authenticated user is not authorized to access.
func (*ErrPermissionDenied) Error ¶ added in v0.1.4
func (e *ErrPermissionDenied) Error() string
type ErrUnexpectedResponse ¶
ErrUnexpectedResponse represents the situation in which an unexpected HTTP status code was returned from an API call.
func (*ErrUnexpectedResponse) Error ¶
func (e *ErrUnexpectedResponse) Error() string
type ErrValidation ¶ added in v0.2.37
type ErrValidation struct {
Response *http.Response
ValidationError *commonsv2.ValidationErrors
}
ErrValidation represents a validation error response from the server.
func (*ErrValidation) Error ¶ added in v0.2.37
func (e *ErrValidation) Error() string
Click to show internal directories.
Click to hide internal directories.