errors

package
v0.0.0-...-93edf92 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2018 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Auth provides a new Authentication error builder
	Auth = newPartyError(http.StatusSeeOther, "Authentication Error", "Could not login via Spotify.")
	// Forbidden provides a new Forbidden error builder
	Forbidden = newPartyError(http.StatusForbidden, "Forbidden", "Forbidden request made to Party")
	// Unauthorized provides a new Unauthorized error builder
	Unauthorized = newPartyError(http.StatusUnauthorized, "Unauthorized", "Unauthorized request made to Party")
	// BadRequest provides a new Bad Request error builder
	BadRequest = newPartyError(http.StatusBadRequest, "Bad Request", "Bad request made to Party")
	// NotFound provides a new Not Found error builder
	NotFound = newPartyError(http.StatusNotFound, "Not Found", "Requested resource was not found")
	// Internal provides a new Internal Server Error error builder
	Internal = newPartyError(http.StatusInternalServerError, "Internal Error", "An unexpected error occurred with Party")
)

Functions

func HandleErrors

func HandleErrors() gin.HandlerFunc

HandleErrors returns Gin middleware that collates and reports reported errors

Types

This section is empty.

Jump to

Keyboard shortcuts

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