Skip to content

Commit

Permalink
changed from redirect with error to with warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Godmartinz committed Jan 9, 2025
1 parent 152c23b commit 082a974
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/Listeners/CheckoutableListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ public function onCheckedOut($event)
}
} catch (ClientException $e) {
Log::error("ClientException caught during checkin notification: " . $e->getMessage());
return redirect()->back()->with('error', ucfirst(Setting::getSettings()->webhook_selected) . ' webhook notification failed: Check to make sure your URL is still valid.');
return redirect()->back()->with('warning', ucfirst(Setting::getSettings()->webhook_selected) . ' webhook notification failed: Check to make sure your URL is still valid.');
} catch (Exception $e) {
Log::error(ucfirst(Setting::getSettings()->webhook_selected) . ' webhook notification failed:', [
'error' => $e->getMessage(),
'webhook_endpoint' => Setting::getSettings()->webhook_endpoint,
'event' => $event,
]);
return redirect()->back()->with('error', ucfirst(Setting::getSettings()->webhook_selected) . ' webhook notification failed: Check to make sure your URL is still valid.');
return redirect()->back()->with('warning', ucfirst(Setting::getSettings()->webhook_selected) . ' webhook notification failed: Check to make sure your URL is still valid.');
}
}

Expand Down Expand Up @@ -197,14 +197,14 @@ public function onCheckedIn($event)
}
} catch (ClientException $e) {
Log::error("ClientException caught during checkin notification: " . $e->getMessage());
return redirect()->back()->with('error', ucfirst(Setting::getSettings()->webhook_selected) .' webhook notification failed: Check to make sure the URL is still valid.');
return redirect()->back()->with('warning', ucfirst(Setting::getSettings()->webhook_selected) .' webhook notification failed: Check to make sure the URL is still valid.');
} catch (Exception $e) {
Log::error(ucfirst(Setting::getSettings()->webhook_selected) . ' webhook notification failed:', [
'error' => $e->getMessage(),
'webhook_endpoint' => Setting::getSettings()->webhook_endpoint,
'event' => $event,
]);
return redirect()->back()->with('error', ucfirst(Setting::getSettings()->webhook_selected) . ' webhook notification failed: Check to make sure the URL is still valid.');
return redirect()->back()->with('warning', ucfirst(Setting::getSettings()->webhook_selected) . ' webhook notification failed: Check to make sure the URL is still valid.');
}
}

Expand Down

0 comments on commit 082a974

Please sign in to comment.