errdef

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TraitConfig            = errorx.RegisterTrait("config")
	TraitIllegalArgument   = errorx.RegisterTrait("illegal_argument")
	TraitNotFound          = errorx.RegisterTrait("not_found")
	TraitAuth              = errorx.RegisterTrait("auth")
	TraitARC               = errorx.RegisterTrait("arc")
	TraitShouldNeverHappen = errorx.RegisterTrait("should_never_happen")
	TraitUnsupported       = errorx.RegisterTrait("unsupported")
)
View Source
var PropPublicHint = errorx.RegisterPrintableProperty("public_hint")

Functions

This section is empty.

Types

type ProblemDetails

type ProblemDetails struct {
	api.ErrorsProblemDetails
}

ProblemDetails is a struct that represents a problem details object as defined in RFC 7807. https://datatracker.ietf.org/doc/html/rfc7807

func (*ProblemDetails) FromInternalError

func (p *ProblemDetails) FromInternalError(err error) *ProblemDetails

FromInternalError maps an internal error to a ProblemDetails object.

func (*ProblemDetails) PushDetail

func (p *ProblemDetails) PushDetail(detail string) *ProblemDetails

PushDetail appends a detail to the existing details, separated by a semicolon.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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