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.
Click to show internal directories.
Click to hide internal directories.