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

Function logRPCError

pkg/interop/server.go:281–291  ·  view source on GitHub ↗
(logger log.Interface, err error, msg string)

Source from the content-addressed store, hash-verified

279}
280
281func logRPCError(logger log.Interface, err error, msg string) {
282 logger = logger.WithError(err)
283 var printLog func(args ...any)
284 switch {
285 case errors.IsNotFound(err), errors.IsInvalidArgument(err), errors.IsCanceled(err):
286 printLog = logger.Debug
287 default:
288 printLog = logger.Warn
289 }
290 printLog(msg)
291}

Callers 1

handleMethod · 0.85

Calls 4

IsNotFoundFunction · 0.92
IsInvalidArgumentFunction · 0.92
IsCanceledFunction · 0.92
WithErrorMethod · 0.65

Tested by

no test coverage detected