From c060ceef7874ca27cf4e5e94fe02f55ccb78313d Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Thu, 12 Sep 2019 13:01:14 -0700 Subject: [PATCH] Show error if POST fails. --- commands/onboard.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/onboard.go b/commands/onboard.go index b223ce46..35a321df 100644 --- a/commands/onboard.go +++ b/commands/onboard.go @@ -105,6 +105,9 @@ func onboardAction(ctx *cli.Context) error { return errors.Wrap(err, "error connecting onboarding guide") } 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("Step CA is starting. Please return to the onboarding guide in your browser to continue.\n")