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

Function IsNotFoundError

pkg/errorutil/errors.go:18–24  ·  view source on GitHub ↗

IsNotFoundError reports whether err represents an HTTP 404 / "not found" response. It returns false when err is nil. The check is case-insensitive and matches both the numeric literal "404" and the phrase "not found", which covers all known forms returned by the GitHub API, the gh CLI, and the go-gh

(err error)

Source from the content-addressed store, hash-verified

16// the phrase "not found", which covers all known forms returned by the GitHub API,
17// the gh CLI, and the go-gh library.
18func IsNotFoundError(err error) bool {
19 matched := containsErrorSubstring(err, "404", "not found")
20 if matched {
21 errorutilLog.Printf("Classified error as not-found (404): %v", err)
22 }
23 return matched
24}
25
26// IsForbiddenError reports whether err represents an HTTP 403 / "forbidden" response.
27// It returns false when err is nil.

Callers 14

TestIsNotFoundErrorFunction · 0.92
TestCheckRemoteSymlinkFunction · 0.92
TestIsNotFoundErrorFunction · 0.92
extractMCPToolUsageDataFunction · 0.92
downloadWorkflowRunLogsFunction · 0.92
createProjectFunction · 0.92
extractLogMetricsFunction · 0.92

Calls 2

containsErrorSubstringFunction · 0.85
PrintfMethod · 0.45