Merge pull request #2069 from smallstep/mariano/urn

Change URN for acme errors
This commit is contained in:
Mariano Cano
2024-11-15 15:59:03 -08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -312,7 +312,7 @@ func (o *Order) Finalize(ctx context.Context, db DB, csr *x509.CertificateReques
//nolint:govet // ignore non-constant format string
acmeError := NewDetailedError(ErrorUnauthorizedType, webhookErr.Error())
acmeError.AddSubproblems(Subproblem{
Type: fmt.Sprintf("urn:smallstep:webhook:error:%s", webhookErr.Code),
Type: fmt.Sprintf("urn:smallstep:acme:error:%s", webhookErr.Code),
Detail: webhookErr.Message,
})
return acmeError

View File

@@ -636,7 +636,7 @@ func TestOrder_Finalize(t *testing.T) {
},
},
err: NewDetailedError(ErrorUnauthorizedType, "The message (theCode)").AddSubproblems(Subproblem{
Type: "urn:smallstep:webhook:error:theCode",
Type: "urn:smallstep:acme:error:theCode",
Detail: "The message",
}),
}