httperror

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(status string, body io.Reader) error

New returns an error that formats as the given text.

Types

type HTTPError

type HTTPError struct {
	StatusCode    int `json:"statusCode"`
	Status        string
	Body          string
	ParsedError   string `json:"error"`
	ParsedMessage string `json:"message"`
}

HTTPError generates a structure error from an http response

func (*HTTPError) Error

func (e *HTTPError) Error() string

Jump to

Keyboard shortcuts

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