diff --git a/app/Http/Controllers/Account/AcceptanceController.php b/app/Http/Controllers/Account/AcceptanceController.php index c6cdf9bbf8..e29fa7c63b 100644 --- a/app/Http/Controllers/Account/AcceptanceController.php +++ b/app/Http/Controllers/Account/AcceptanceController.php @@ -240,7 +240,7 @@ class AcceptanceController extends Controller try { $acceptance->notify(new AcceptanceAssetAcceptedNotification($data)); } catch (\Exception $e) { - Log::error($e); + Log::warning($e); } event(new CheckoutAccepted($acceptance)); diff --git a/app/Http/Controllers/ViewAssetsController.php b/app/Http/Controllers/ViewAssetsController.php index db4afc8322..12c300e5bd 100755 --- a/app/Http/Controllers/ViewAssetsController.php +++ b/app/Http/Controllers/ViewAssetsController.php @@ -13,6 +13,7 @@ use App\Notifications\RequestAssetNotification; use Illuminate\Http\Request; use Illuminate\Http\RedirectResponse; use \Illuminate\Contracts\View\View; +use Log; /** * This controller handles all actions related to the ability for users @@ -179,8 +180,11 @@ class ViewAssetsController extends Controller $asset->decrement('requests_counter', 1); $logaction->logaction('request canceled'); - $settings->notify(new RequestAssetCancelation($data)); - + try { + $settings->notify(new RequestAssetCancelation($data)); + } catch (\Exception $e) { + Log::warning($e); + } return redirect()->route('requestable-assets') ->with('success')->with('success', trans('admin/hardware/message.requests.canceled')); } @@ -188,7 +192,11 @@ class ViewAssetsController extends Controller $logaction->logaction('requested'); $asset->request(); $asset->increment('requests_counter', 1); - $settings->notify(new RequestAssetNotification($data)); + try { + $settings->notify(new RequestAssetNotification($data)); + } catch (\Exception $e) { + Log::warning($e); + } return redirect()->route('requestable-assets')->with('success')->with('success', trans('admin/hardware/message.requests.success')); }