File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,9 +156,8 @@ func checkForErrors(res *http.Response, body string) error {
156156// CheckConnection checks that the user is connected to a network and the URL points to a valid controller.
157157func CheckConnection (client * http.Client , controllerURL url.URL ) error {
158158 errorMessage := `%s does not appear to be a valid Deis controller.
159- Make sure that the Controller URI is correct and the server is running.`
160-
161- baseURL := controllerURL .String ()
159+ Make sure that the Controller URI is correct, the server is running and
160+ your client version is correct.`
162161
163162 controllerURL .Path = "/v2/"
164163
@@ -172,13 +171,13 @@ Make sure that the Controller URI is correct and the server is running.`
172171 res , err := client .Do (req )
173172
174173 if err != nil {
175- fmt .Printf (errorMessage + "\n " , baseURL )
174+ fmt .Printf (errorMessage + "\n " , controllerURL . String () )
176175 return err
177176 }
178177 defer res .Body .Close ()
179178
180179 if res .StatusCode != 401 {
181- return fmt .Errorf (errorMessage , baseURL )
180+ return fmt .Errorf (errorMessage , controllerURL . String () )
182181 }
183182
184183 checkAPICompatibility (res .Header .Get ("DEIS_API_VERSION" ))
You can’t perform that action at this time.
0 commit comments