MCPcopy Index your code
hub / github.com/PasarGuard/node / InterceptNotFound

Function InterceptNotFound

common/helper.go:107–112  ·  view source on GitHub ↗

InterceptNotFound checks for errors ending with "not found." and wraps them as gRPC NotFound.

(err error)

Source from the content-addressed store, hash-verified

105// InterceptNotFound checks for errors ending with "not found."
106// and wraps them as gRPC NotFound.
107func InterceptNotFound(err error) error {
108 if err != nil && strings.HasSuffix(err.Error(), "not found.") {
109 return status.Error(codes.NotFound, err.Error())
110 }
111 return err
112}

Callers 6

GetStatsMethod · 0.92
GetUserOnlineStatsMethod · 0.92
GetStatsMethod · 0.92
GetUserOnlineStatMethod · 0.92

Calls 1

ErrorMethod · 0.80

Tested by

no test coverage detected