httperror

package
v0.0.0-...-e20ad14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 5 Imported by: 9

Documentation

Index

Constants

View Source
const HTTP_ERROR_METRIC_NAME = "http_error"

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	MetricsSender metricsSender
}

func (*ErrorResponse) BadRequest

func (e *ErrorResponse) BadRequest(logger lager.Logger, w http.ResponseWriter, err error, description string)

func (*ErrorResponse) Conflict

func (e *ErrorResponse) Conflict(logger lager.Logger, w http.ResponseWriter, err error, description string)

func (*ErrorResponse) Forbidden

func (e *ErrorResponse) Forbidden(logger lager.Logger, w http.ResponseWriter, err error, description string)

func (*ErrorResponse) InternalServerError

func (e *ErrorResponse) InternalServerError(logger lager.Logger, w http.ResponseWriter, err error, description string)

func (*ErrorResponse) NotAcceptable

func (e *ErrorResponse) NotAcceptable(logger lager.Logger, w http.ResponseWriter, err error, description string)

func (*ErrorResponse) NotFound

func (e *ErrorResponse) NotFound(logger lager.Logger, w http.ResponseWriter, err error, description string)

func (*ErrorResponse) Unauthorized

func (e *ErrorResponse) Unauthorized(logger lager.Logger, w http.ResponseWriter, err error, description string)

type MetadataError

type MetadataError struct {
	// contains filtered or unexported fields
}

func NewMetadataError

func NewMetadataError(internalError error, metadata map[string]interface{}) MetadataError

func (MetadataError) Error

func (m MetadataError) Error() string

func (MetadataError) Metadata

func (m MetadataError) Metadata() map[string]interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL