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

Function containsHTTPStatusSubstring

pkg/errorutil/errors.go:70–79  ·  view source on GitHub ↗

containsHTTPStatusSubstring reports whether err contains a recognized HTTP-style status pattern for the provided status code and keyword.

(err error, code, keyword string)

Source from the content-addressed store, hash-verified

68// containsHTTPStatusSubstring reports whether err contains a recognized
69// HTTP-style status pattern for the provided status code and keyword.
70func containsHTTPStatusSubstring(err error, code, keyword string) bool {
71 return containsErrorSubstring(
72 err,
73 "http "+code,
74 "http status "+code,
75 "status "+code,
76 code+": "+keyword,
77 code+" "+keyword,
78 )
79}

Callers 2

IsForbiddenErrorFunction · 0.85
IsGoneErrorFunction · 0.85

Calls 1

containsErrorSubstringFunction · 0.85

Tested by

no test coverage detected