errors

package
v0.0.0-...-61905c3 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCredentialNotFound = NewError(fiber.StatusUnauthorized, "auth_failed", "Credential not found")

	ErrOauthClientNotFound = NewError(fiber.StatusNotFound, "oauth_client_not_found", "Client not found")
)

Errors

Functions

func WriteErrorJSON

func WriteErrorJSON(c *fiber.Ctx, err *Error) error

Types

type Error

type Error struct {
	Code    int    `json:"code"`
	ErrorID string `json:"error"`
	Message string `json:"message"`
}

Error represents error during request handling

func NewError

func NewError(code int, errorID string, message string) *Error

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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