serviceerr

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConflict = newErr("already exists", CodeConflict)
View Source
var ErrFingerprintMismatch = newErr("fingerprint mismatch", CodeFingerprintMismatch)
View Source
var ErrInvalidAtHash = newErr("invalid atHash token", CodeInvalidAtHashToken)
View Source
var ErrInvalidCSRFToken = newErr("invalid CSRF token", CodeInvalidCSRFToken)
View Source
var ErrInvalidOIDCProvider = newErr("invalid OIDC provider", CodeInvalidOIDCProvider)
View Source
var ErrNotFound = newErr("not found", CodeNotFound)
View Source
var ErrStateExpired = newErr("state expired", CodeStateExpired)
View Source
var ErrUnauthorized = newErr("unauthorized", CodeUnauthorized)
View Source
var ErrUnknown = newErr("unknown error", CodeUnknown)

Functions

This section is empty.

Types

type Code added in v0.5.0

type Code int
const (
	CodeUnknown Code = iota
	CodeConflict
	CodeNotFound
	CodeFingerprintMismatch
	CodeStateExpired
	CodeInvalidOIDCProvider
	CodeInvalidCSRFToken
	CodeUnauthorized
	CodeInvalidAtHashToken
)

type Error added in v0.5.0

type Error struct {
	Message string
	Code    Code
}

func (*Error) Error added in v0.5.0

func (e *Error) Error() string

func (Error) HTTPStatus added in v0.5.0

func (e Error) HTTPStatus() int

Jump to

Keyboard shortcuts

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