HandleHTTPError parses a http.Response into a HTTPError. The caller is responsible to close the response body stream.
(resp *http.Response)
| 156 | // |
| 157 | // The caller is responsible to close the response body stream. |
| 158 | func HandleHTTPError(resp *http.Response) error { |
| 159 | return handleResponse(ghAPI.HandleHTTPError(resp)) |
| 160 | } |
| 161 | |
| 162 | // handleResponse takes a ghAPI.HTTPError or ghAPI.GraphQLError and converts it into an |
| 163 | // HTTPError or GraphQLError respectively. |