Back to godoc.org

Package httperror

v0.0.0-...-fdd7ea7
Latest Go to latest

The latest major version is .

Published: Jul 21, 2020 | License: Apache-2.0 | Module: code.cloudfoundry.org/cf-networking-helpers

Index

Constants

const HTTP_ERROR_METRIC_NAME = "http_error"

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{}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier