We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a2b425 commit c67afb4Copy full SHA for c67afb4
1 file changed
builder/bin/publish-release-controller.go
@@ -5,6 +5,7 @@ import (
5
"flag"
6
"fmt"
7
"io/ioutil"
8
+ "log"
9
"net/http"
10
"os"
11
"regexp"
@@ -77,15 +78,14 @@ func main() {
77
78
79
res, err := client.Do(req)
80
- if res.StatusCode == 404 {
81
- fmt.Println("Check the Controller. Is it running?")
82
- os.Exit(1)
+ if err != nil {
+ log.Fatalln(err)
83
}
84
85
- if err != nil || res.StatusCode != 200 {
86
- fmt.Println("failed retrieving config from controller")
87
- fmt.Println(res.Body)
88
+ if res.StatusCode == 503 {
+ log.Fatalln("check the controller. is it running?")
+ } else if res.StatusCode != 200 {
+ log.Fatalf("failed retrieving config from controller: %s\n", res.Body)
89
90
91
defer res.Body.Close()
0 commit comments