Sfoglia il codice sorgente

Change URN for acme errors

This commit changes the urn suffix for acme errors to urn:smallstep:acme:error
Mariano Cano 2 anni fa
parent
commit
1a2e64724a
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      acme/order.go
  2. 1 1
      acme/order_test.go

+ 1 - 1
acme/order.go

@@ -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

+ 1 - 1
acme/order_test.go

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