MCPcopy Index your code
hub / github.com/jetify-com/devbox / isConnectionError

Function isConnectionError

internal/devbox/errors.go:5–12  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

3import "strings"
4
5func isConnectionError(err error) bool {
6 if err == nil {
7 return false
8 }
9
10 return strings.Contains(err.Error(), "no such host") ||
11 strings.Contains(err.Error(), "connection refused")
12}

Callers 1

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected