mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Apply changes to exception handling for check outs to check ins
This commit is contained in:
parent
2a29566458
commit
9ef598d07b
|
@ -98,11 +98,6 @@ class CheckoutableListener
|
|||
}
|
||||
|
||||
try {
|
||||
if ($this->shouldSendWebhookNotification()) {
|
||||
Notification::route('slack', Setting::getSettings()->webhook_endpoint)
|
||||
->notify($this->getCheckinNotification($event));
|
||||
}
|
||||
|
||||
// Use default locale
|
||||
if (! $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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue