Merge pull request #1831 from smallstep/mariano/err-not-found

Use always acme.IsErrNotFound
pull/1829/head
Mariano Cano 2 weeks ago committed by GitHub
commit a2f2332848
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -247,7 +247,7 @@ func extractJWK(next nextHTTP) nextHTTP {
// Get Account OR continue to generate a new one OR continue Revoke with certificate private key
acc, err := db.GetAccountByKeyID(ctx, jwk.KeyID)
switch {
case errors.Is(err, acme.ErrNotFound):
case acme.IsErrNotFound(err):
// For NewAccount and Revoke requests ...
break
case err != nil:

@ -1,7 +1,6 @@
package api
import (
"errors"
"net/http"
"github.com/go-chi/chi/v5"
@ -125,7 +124,7 @@ func loadExternalAccountKey(next http.HandlerFunc) http.HandlerFunc {
}
if err != nil {
if errors.Is(err, acme.ErrNotFound) {
if acme.IsErrNotFound(err) {
render.Error(w, admin.NewError(admin.ErrorNotFoundType, "ACME External Account Key not found"))
return
}

Loading…
Cancel
Save