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

Function convertError

pkg/rpcmiddleware/validator/validator.go:88–93  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

86}
87
88func convertError(err error) error {
89 if ttnErr, ok := errors.From(err); ok {
90 return ttnErr
91 }
92 return status.Error(codes.InvalidArgument, err.Error())
93}
94
95var (
96 errNoValidator = errors.DefineUnimplemented("no_validator", "validator not defined")

Callers 1

validateMessageFunction · 0.70

Calls 2

FromFunction · 0.92
ErrorMethod · 0.65

Tested by

no test coverage detected