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

Function IsCanceled

pkg/errors/codes.go:79–81  ·  view source on GitHub ↗

IsCanceled returns whether the givenerror is context.Canceled or of type Canceled.

(err error)

Source from the content-addressed store, hash-verified

77
78// IsCanceled returns whether the givenerror is context.Canceled or of type Canceled.
79func IsCanceled(err error) bool {
80 return HasCode(err, uint32(codes.Canceled))
81}
82
83// IsUnknown returns whether the given error is of type Unknown.
84func IsUnknown(err error) bool { return HasCode(err, uint32(codes.Unknown)) }

Callers 15

setMethod · 0.92
LinkGatewayMethod · 0.92
TestAuthenticationFunction · 0.92
FrontendFunction · 0.92
logRPCErrorFunction · 0.92
retryableUplinkErrorFunction · 0.92
logRegistryRPCErrorFunction · 0.92
TestCodesFunction · 0.92
TestContextCanceledFunction · 0.92
SubscribeMethod · 0.92

Calls 1

HasCodeFunction · 0.85

Tested by 9

TestAuthenticationFunction · 0.74
TestCodesFunction · 0.74
TestContextCanceledFunction · 0.74
TestBackendFunction · 0.74
TestPopTaskFunction · 0.74
TestTaskQueueFunction · 0.74
TestApplicationServerFunction · 0.74
TestAuthenticationFunction · 0.74
TestAuthenticationFunction · 0.74