Skip to content

Commit

Permalink
Merge pull request #9 from grycap/devel
Browse files Browse the repository at this point in the history
Add error message when a service is not ready in svc run command
  • Loading branch information
srisco authored Mar 30, 2022
2 parents 151a99f + 071c6e4 commit 69718cf
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 69718cf

Please sign in to comment.