MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / WithAttributes

Method WithAttributes

pkg/errors/attributes.go:114–121  ·  view source on GitHub ↗

WithAttributes returns a new error from the definition, and sets the given attributes.

(kv ...any)

Source from the content-addressed store, hash-verified

112
113// WithAttributes returns a new error from the definition, and sets the given attributes.
114func (d *Definition) WithAttributes(kv ...any) *Error {
115 if d == nil {
116 return nil
117 }
118 e := build(d, 0) // Don't refactor this to build(...).WithAttributes(...)
119 e.mergeAttributes(kv...)
120 return e
121}
122
123// Attributes of the error.
124func (e *Error) Attributes() map[string]any {

Callers

nothing calls this directly

Calls 2

buildFunction · 0.85
mergeAttributesMethod · 0.80

Tested by

no test coverage detected