A free open source IT asset/license management system
Apply changes to exception handling for check outs to check ins
Marcus Moore9ef598d07bda
diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.phpindex 01e5041f67..34d93550ed 100644--- a/app/Listeners/CheckoutableListener.php+++ b/app/Listeners/CheckoutableListener.php@@ -98,11 +98,6 @@ class CheckoutableListener}try {- if ($this->shouldSendWebhookNotification()) {- Notification::route('slack', Setting::getSettings()->webhook_endpoint)- ->notify($this->getCheckinNotification($event));- }-// Use default localeif (! $event->checkedOutTo->locale) {Notification::locale(Setting::getSettings()->locale)->send(@@ -115,7 +110,17 @@ class CheckoutableListener$this->getCheckinNotification($event));}++ if ($this->shouldSendWebhookNotification()) {+ Notification::route('slack', Setting::getSettings()->webhook_endpoint)+ ->notify($this->getCheckinNotification($event));+ }} catch (Exception $e) {+ if ($e instanceof ClientException){+ Log::debug("Exception caught during checkout notification: ".$e->getMessage());+ return;+ }+Log::error("Exception caught during checkin notification: ".$e->getMessage());}}