Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleAPIError ¶
func HandleAPIError( config *config.Config, w http.ResponseWriter, r *http.Request, err RequestError, )
Types ¶
type ErrForbidden ¶
type ErrForbidden struct {
// contains filtered or unexported fields
}
func (*ErrForbidden) Error ¶
func (e *ErrForbidden) Error() string
func (*ErrForbidden) ExternalError ¶
func (e *ErrForbidden) ExternalError() string
func (*ErrForbidden) GetStatusCode ¶
func (e *ErrForbidden) GetStatusCode() int
func (*ErrForbidden) InternalError ¶
func (e *ErrForbidden) InternalError() string
type ErrInternal ¶
type ErrInternal struct {
// contains filtered or unexported fields
}
func (*ErrInternal) Error ¶
func (e *ErrInternal) Error() string
func (*ErrInternal) ExternalError ¶
func (e *ErrInternal) ExternalError() string
func (*ErrInternal) GetStatusCode ¶
func (e *ErrInternal) GetStatusCode() int
func (*ErrInternal) InternalError ¶
func (e *ErrInternal) InternalError() string
type ErrPassThroughToClient ¶
type ErrPassThroughToClient struct {
// contains filtered or unexported fields
}
errors that should be passed directly, with no filter
func (*ErrPassThroughToClient) Error ¶
func (e *ErrPassThroughToClient) Error() string
func (*ErrPassThroughToClient) ExternalError ¶
func (e *ErrPassThroughToClient) ExternalError() string
func (*ErrPassThroughToClient) GetStatusCode ¶
func (e *ErrPassThroughToClient) GetStatusCode() int
func (*ErrPassThroughToClient) InternalError ¶
func (e *ErrPassThroughToClient) InternalError() string
type RequestError ¶
type RequestError interface { Error() string ExternalError() string InternalError() string GetStatusCode() int }
func NewErrForbidden ¶
func NewErrForbidden(err error) RequestError
func NewErrInternal ¶
func NewErrInternal(err error) RequestError
func NewErrPassThroughToClient ¶
func NewErrPassThroughToClient(err error, statusCode int) RequestError
Click to show internal directories.
Click to hide internal directories.