Skip to content

Commit 406f576

Browse files
authored
Merge pull request letsencrypt#2729 from letsencrypt/remove-old-err-checks
Remove core.XXXError type checks
2 parents b9369a4 + 636a1fc commit 406f576

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

cmd/orphan-finder/main.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ func checkDER(sai certificateStorage, der []byte) error {
6767
if err == nil {
6868
return errAlreadyExists
6969
}
70-
// TODO(#2600): Remove core.NotFoundError check once boulder/errors
71-
// code is deployed
72-
if _, ok := err.(core.NotFoundError); ok || berrors.Is(err, berrors.NotFound) {
70+
if berrors.Is(err, berrors.NotFound) {
7371
return nil
7472
}
7573
return fmt.Errorf("Existing certificate lookup failed: %s", err)

wfe/wfe.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,7 @@ func (wfe *WebFrontEndImpl) verifyPOST(ctx context.Context, logEvent *requestEve
477477
// Special case: If no registration was found, but regCheck is false, use an
478478
// empty registration and the submitted key. The caller is expected to do some
479479
// validation on the returned key.
480-
// TODO(#2600): Remove core.NoSuchRegistrationError check once boulder/errors
481-
// code is deployed
482-
if _, ok := err.(core.NoSuchRegistrationError); (ok || berrors.Is(err, berrors.NotFound)) && !regCheck {
480+
if berrors.Is(err, berrors.NotFound) && !regCheck {
483481
// When looking up keys from the registrations DB, we can be confident they
484482
// are "good". But when we are verifying against any submitted key, we want
485483
// to check its quality before doing the verify.
@@ -493,9 +491,7 @@ func (wfe *WebFrontEndImpl) verifyPOST(ctx context.Context, logEvent *requestEve
493491
// For all other errors, or if regCheck is true, return error immediately.
494492
wfe.stats.Inc("Errors.UnableToGetRegistrationByKey", 1)
495493
logEvent.AddError("unable to fetch registration by the given JWK: %s", err)
496-
// TODO(#2600): Remove core.NoSuchRegistrationError check once boulder/errors
497-
// code is deployed
498-
if _, ok := err.(core.NoSuchRegistrationError); ok || berrors.Is(err, berrors.NotFound) {
494+
if berrors.Is(err, berrors.NotFound) {
499495
return nil, nil, reg, probs.Unauthorized(unknownKey)
500496
}
501497

0 commit comments

Comments
 (0)