Do not use the templateError in the BadRequestErr

pull/1062/head
max furman 2 years ago
parent c26d2c8328
commit 120629edab
No known key found for this signature in database

@ -203,10 +203,10 @@ func (a *Authority) SignSSH(ctx context.Context, key ssh.PublicKey, opts provisi
// Create certificate from template.
certificate, err := sshutil.NewCertificate(cr, certOptions...)
if err != nil {
var templErr *sshutil.TemplateError
if errors.As(err, &templErr) {
var te *sshutil.TemplateError
if errors.As(err, &te) {
return nil, errs.ApplyOptions(
errs.BadRequestErr(templErr, templErr.Error()),
errs.BadRequestErr(err, err.Error()),
errs.WithKeyVal("signOptions", signOpts),
)
}

Loading…
Cancel
Save