mirror of
https://github.com/wahyd4/cert-manager.git
synced 2026-08-25 21:16:27 +10:00
Properly handle ErrNoAccount
Signed-off-by: James Munnelly <james@munnelly.eu>
This commit is contained in:
@@ -275,11 +275,7 @@ func (a *Acme) registerAccount(ctx context.Context, cl client.Interface) (*acmea
|
||||
if err == nil {
|
||||
return acc, nil
|
||||
}
|
||||
|
||||
// return all errors except for 404 errors (which indicate the account
|
||||
// is not yet registered)
|
||||
acmeErr, ok := err.(*acmeapi.Error)
|
||||
if !ok || (acmeErr.StatusCode != 400 && acmeErr.StatusCode != 404) {
|
||||
if err != acmeapi.ErrNoAccount {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user