containsHTTPStatusSubstring reports whether err contains a recognized HTTP-style status pattern for the provided status code and keyword.
(err error, code, keyword string)
| 68 | // containsHTTPStatusSubstring reports whether err contains a recognized |
| 69 | // HTTP-style status pattern for the provided status code and keyword. |
| 70 | func 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 | } |
no test coverage detected