MCPcopy
hub / github.com/redis/go-redis / isNetworkError

Function isNetworkError

extra/redisotel-native/metrics.go:329–337  ·  view source on GitHub ↗

isNetworkError checks if an error is a network-related error

(err error)

Source from the content-addressed store, hash-verified

327
328// isNetworkError checks if an error is a network-related error
329func isNetworkError(err error) bool {
330 if err == nil {
331 return false
332 }
333
334 // Check for net.Error interface (standard way to detect network errors)
335 _, ok := err.(net.Error)
336 return ok
337}
338
339// isTimeoutError checks if an error is a timeout error
340func isTimeoutError(err error) bool {

Callers 2

classifyErrorFunction · 0.85
getErrorCategoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected