From bd32f853e5b853d430e32d2eeb8ea595db68f972 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Thu, 21 Nov 2019 16:55:35 -0800 Subject: [PATCH] Add missing flag and 404 error. --- flags/flags.go | 5 +++++ utils/cautils/teams.go | 3 +++ 2 files changed, 8 insertions(+) diff --git a/flags/flags.go b/flags/flags.go index 383f9b9c..be488e00 100644 --- a/flags/flags.go +++ b/flags/flags.go @@ -202,6 +202,11 @@ be stored in the 'x5c' header.`, Usage: `Private key , used to sign a JWT, corresponding to the certificate that will be stored in the 'sshpop' header.`, } + + Team = cli.StringFlag{ + Name: "team", + Usage: "The team used to bootstrap the environment.", + } ) // ParseTimeOrDuration is a helper that returns the time or the current time diff --git a/utils/cautils/teams.go b/utils/cautils/teams.go index c85c278b..6a1de43d 100644 --- a/utils/cautils/teams.go +++ b/utils/cautils/teams.go @@ -37,6 +37,9 @@ func BootstrapTeam(ctx *cli.Context, name string) error { return errors.Wrap(err, "error getting team data") } if resp.StatusCode >= 400 { + if resp.StatusCode == http.StatusNotFound { + return errors.New("error getting team data: team does not exist") + } return errors.Wrap(readError(resp.Body), "error getting team data") }