Skip to content

Commit

Permalink
Add error message when a service is not ready in svc run command
Browse files Browse the repository at this point in the history
  • Loading branch information
srisco committed Mar 30, 2022
1 parent 151a99f commit 071c6e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ func CheckStatusCode(res *http.Response) error {
if res.StatusCode == 404 {
return errors.New("not found")
}
if res.StatusCode == 502 {
return errors.New("the service is not ready yet, please wait until it's ready or check the if something failed")
}
// Create an error from the failed response body
body, err := ioutil.ReadAll(res.Body)
if err != nil {
Expand Down

0 comments on commit 071c6e4

Please sign in to comment.