Documentation ¶
Index ¶
- Variables
- func BadRequest(ctx context.Context, w http.ResponseWriter, err error)
- func ErrorStatus(err error) (status int, message string)
- func Forbidden(ctx context.Context, w http.ResponseWriter)
- func FromResponse(resp *http.Response, err error) error
- func FromStatus(status int, err error) error
- func HandleError(ctx context.Context, w http.ResponseWriter, err error) bool
- func InternalServerError(ctx context.Context, w http.ResponseWriter, err error)
- func Log(ctx context.Context, err error, status int, message string)
- func NotFound(ctx context.Context, w http.ResponseWriter)
- func Unauthorized(ctx context.Context, w http.ResponseWriter, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoLog = errors.New("no log")
Functions ¶
func BadRequest ¶
func BadRequest(ctx context.Context, w http.ResponseWriter, err error)
func ErrorStatus ¶
func FromStatus ¶ added in v4.46.2
func HandleError ¶
func InternalServerError ¶
func InternalServerError(ctx context.Context, w http.ResponseWriter, err error)
func Unauthorized ¶
func Unauthorized(ctx context.Context, w http.ResponseWriter, err error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.