MCPcopy Create free account
hub / github.com/github/gh-aw / IsGoneError

Function IsGoneError

pkg/errorutil/errors.go:44–50  ·  view source on GitHub ↗

IsGoneError reports whether err represents an HTTP 410 / "gone" response. It returns false when err is nil. The check is case-insensitive and only matches HTTP-style 410 patterns such as "HTTP 410" or "410 Gone", which avoids misclassifying unrelated errors like "connection has gone away".

(err error)

Source from the content-addressed store, hash-verified

42// "HTTP 410" or "410 Gone", which avoids misclassifying unrelated errors like
43// "connection has gone away".
44func IsGoneError(err error) bool {
45 matched := containsHTTPStatusSubstring(err, "410", "gone")
46 if matched {
47 errorutilLog.Printf("Classified error as gone (410): %v", err)
48 }
49 return matched
50}
51
52// containsErrorSubstring reports whether err contains any of the provided
53// substrings after lowercasing the full error message for case-insensitive

Callers 4

TestIsGoneErrorFunction · 0.92
downloadWorkflowRunLogsFunction · 0.92

Calls 2

PrintfMethod · 0.45

Tested by 3

TestIsGoneErrorFunction · 0.74