Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error handling in verifyConn
- Avoid a panic when the http.Get resp is nil by returning the error before deferring resp.Body.Close() - http.Get will not return an error for non-2xx response codes, so check the response code explicitly and return an error when it isn't the expected 200 response - Return the error from ioutil.ReadAll - Use fmt.Errorf across the board - Include the caURL in the error messages to hopefully make the source of errors clearer up the stack
- Loading branch information