errors

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleError

func HandleError(w http.ResponseWriter, r *http.Request, err error)

Types

type Error

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

func OAuth2AccessDenied

func OAuth2AccessDenied(description string) *Error

OAuth2AccessDenied tells the client the authentication failed e.g. username/password are wrong, or a token has expired and needs reauthentication.

func OAuth2InvalidClient

func OAuth2InvalidClient(description string) *Error

OAuth2InvalidClient is raised when the client ID is not known.

func OAuth2InvalidGrant

func OAuth2InvalidGrant(description string) *Error

OAuth2InvalidGrant is raised when the requested grant is unknown.

func OAuth2InvalidRequest

func OAuth2InvalidRequest(description string) *Error

OAuth2InvalidRequest indicates a client error.

func OAuth2InvalidScope

func OAuth2InvalidScope(description string) *Error

OAuth2InvalidScope tells the client it doesn't have the necessary scope to access the resource.

func OAuth2UnauthorizedClient

func OAuth2UnauthorizedClient(description string) *Error

OAuth2UnauthorizedClient indicates the client is not authorized to perform the requested operation.

func OAuth2UnsupportedGrantType

func OAuth2UnsupportedGrantType(description string) *Error

OAuth2UnsupportedGrantType is raised when the requested grant is not supported.

func (*Error) Error

func (e *Error) Error() string

Error implements the error interface.

func (*Error) WithError

func (e *Error) WithError(err error) *Error

func (*Error) Write

func (e *Error) Write(w http.ResponseWriter, r *http.Request)

Write returns the error code and description to the client.

Jump to

Keyboard shortcuts

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