Properly handle ErrNoAccount
Signed-off-by: James Munnelly <james@munnelly.eu>
This commit is contained in:
parent
641fe0da7c
commit
9d28261da5
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user