forked from TrueCloudLab/certificates
Do not use the templateError in the BadRequestErr
This commit is contained in:
parent
c26d2c8328
commit
120629edab
1 changed files with 3 additions and 3 deletions
|
@ -203,10 +203,10 @@ func (a *Authority) SignSSH(ctx context.Context, key ssh.PublicKey, opts provisi
|
||||||
// Create certificate from template.
|
// Create certificate from template.
|
||||||
certificate, err := sshutil.NewCertificate(cr, certOptions...)
|
certificate, err := sshutil.NewCertificate(cr, certOptions...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
var templErr *sshutil.TemplateError
|
var te *sshutil.TemplateError
|
||||||
if errors.As(err, &templErr) {
|
if errors.As(err, &te) {
|
||||||
return nil, errs.ApplyOptions(
|
return nil, errs.ApplyOptions(
|
||||||
errs.BadRequestErr(templErr, templErr.Error()),
|
errs.BadRequestErr(err, err.Error()),
|
||||||
errs.WithKeyVal("signOptions", signOpts),
|
errs.WithKeyVal("signOptions", signOpts),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue