Bank Transactions

This commit is contained in:
David Bomba 2022-10-26 13:27:04 +11:00
parent b3351d88f1
commit 17d90c0291

View File

@ -128,12 +128,19 @@ class NinjaMailerJob implements ShouldQueue
/* Count the amount of emails sent across all the users accounts */
Cache::increment($this->company->account->key);
} catch (\Exception | \RuntimeException $e) {
} catch (\Exception | \RuntimeException | \Google\Service\Exception $e) {
nlog("error failed with {$e->getMessage()}");
$message = $e->getMessage();
if($e instanceof \Google\Service\Exception){
if(($e->getCode() == 429) && ($this->nmo->to_user instanceof ClientContact))
$this->logMailError("Google rate limiter hit, we will retry in 30 seconds.", $this->nmo->to_user->client);
}
/**
* Post mark buries the proper message in a a guzzle response
* this merges a text string with a json object