1
0
mirror of https://github.com/smallstep/cli.git synced 2026-10-29 00:17:23 +03:00

Add missing flag and 404 error.

This commit is contained in:
Mariano Cano
2019-11-21 16:55:35 -08:00
committed by max furman
parent c13581c083
commit bd32f853e5
2 changed files with 8 additions and 0 deletions

View File

@@ -202,6 +202,11 @@ be stored in the 'x5c' header.`,
Usage: `Private key <path>, 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 <name> used to bootstrap the environment.",
}
)
// ParseTimeOrDuration is a helper that returns the time or the current time

View File

@@ -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")
}