Throw exception if email job fails

This commit is contained in:
Hillel Coren 2017-02-09 13:08:48 +02:00
parent 176f8374af
commit d091ea0e0f

View File

@ -119,8 +119,11 @@ class Mailer
$error = trans('texts.postmark_error', ['link' => link_to('https://status.postmarkapp.com/')]);
Utils::logError($error);
// TODO throw the exception once all emails are sent using the queue
if (config('queue.default') === 'sync') {
return $error;
} else {
throw $exception;
}
}
$response = $response->getBody()->getContents();