Return BadRequest when validating sign options.

This commit is contained in:
Mariano Cano 2021-11-23 17:52:17 -08:00
parent bb26799583
commit 031d4d7000

View file

@ -173,7 +173,7 @@ func (a *Authority) SignSSH(ctx context.Context, key ssh.PublicKey, opts provisi
// validate the given SSHOptions // validate the given SSHOptions
case provisioner.SSHCertOptionsValidator: case provisioner.SSHCertOptionsValidator:
if err := o.Valid(opts); err != nil { if err := o.Valid(opts); err != nil {
return nil, errs.ForbiddenErr(err, "error validating ssh certificate options") return nil, errs.BadRequestErr(err, "error validating ssh certificate options")
} }
default: default: