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

Function unexpectedValue

pkg/encoding/lorawan/errors.go:41–48  ·  view source on GitHub ↗
(err interface {
	WithAttributes(kv ...any) *errors.Error
},
)

Source from the content-addressed store, hash-verified

39type valueErr func(any) *errors.Error
40
41func unexpectedValue(err interface {
42 WithAttributes(kv ...any) *errors.Error
43},
44) valueErr {
45 return func(value any) *errors.Error {
46 return err.WithAttributes(valueKey, value)
47 }
48}
49
50func errExpectedLowerOrEqual(lorawanField string, max any) valueErr {
51 return unexpectedValue(errFieldHasMax.WithAttributes("lorawan_field", lorawanField, "max", max))

Callers 11

messages.goFile · 0.70
errExpectedLowerOrEqualFunction · 0.70
errExpectedLengthEqualFunction · 0.70
errUnknownFunction · 0.70
errExpectedBetweenFunction · 0.70

Calls 1

WithAttributesMethod · 0.45

Tested by

no test coverage detected