LE: catch error due to rate-limited account registration
and fix bad english in log message
This commit is contained in:
@@ -73,6 +73,12 @@ class lescript
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
$this->accountKey = $keys['private'];
|
$this->accountKey = $keys['private'];
|
||||||
|
|
||||||
|
$response = $this->postNewReg();
|
||||||
|
if ($this->client->getLastCode() != 201) {
|
||||||
|
throw new \RuntimeException("Account not initialized, probably due to rate limiting. Whole response: " . $response);
|
||||||
|
}
|
||||||
|
|
||||||
$this->postNewReg();
|
$this->postNewReg();
|
||||||
$this->log('New account certificate registered');
|
$this->log('New account certificate registered');
|
||||||
} else {
|
} else {
|
||||||
@@ -84,7 +90,7 @@ class lescript
|
|||||||
public function signDomains(array $domains, $domainkey = null, $csr = null)
|
public function signDomains(array $domains, $domainkey = null, $csr = null)
|
||||||
{
|
{
|
||||||
if (! $this->accountKey) {
|
if (! $this->accountKey) {
|
||||||
throw new \RuntimeException("Account not initiated");
|
throw new \RuntimeException("Account not initialized");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->log('Starting certificate generation process for domains');
|
$this->log('Starting certificate generation process for domains');
|
||||||
|
|||||||
Reference in New Issue
Block a user