Sfoglia il codice sorgente

Show error if POST fails.

Mariano Cano 7 anni fa
parent
commit
c060ceef78
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      commands/onboard.go

+ 3 - 0
commands/onboard.go

@@ -105,6 +105,9 @@ func onboardAction(ctx *cli.Context) error {
 		return errors.Wrap(err, "error connecting onboarding guide")
 		return errors.Wrap(err, "error connecting onboarding guide")
 	}
 	}
 	resp.Body.Close()
 	resp.Body.Close()
+	if resp.StatusCode >= 400 {
+		fmt.Fprintf(os.Stderr, "error connecting onboarding guide: %s\n", res.Status)
+	}
 
 
 	fmt.Printf("Initialized!\n")
 	fmt.Printf("Initialized!\n")
 	fmt.Printf("Step CA is starting. Please return to the onboarding guide in your browser to continue.\n")
 	fmt.Printf("Step CA is starting. Please return to the onboarding guide in your browser to continue.\n")