changed from redirect with error to with warning

This commit is contained in:
Godfrey M 2025-01-09 14:26:54 -08:00
parent 152c23b8f3
commit 082a974ee3

View file

@ -107,14 +107,14 @@ class CheckoutableListener
} }
} catch (ClientException $e) { } catch (ClientException $e) {
Log::error("ClientException caught during checkin notification: " . $e->getMessage()); 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) { } catch (Exception $e) {
Log::error(ucfirst(Setting::getSettings()->webhook_selected) . ' webhook notification failed:', [ Log::error(ucfirst(Setting::getSettings()->webhook_selected) . ' webhook notification failed:', [
'error' => $e->getMessage(), 'error' => $e->getMessage(),
'webhook_endpoint' => Setting::getSettings()->webhook_endpoint, 'webhook_endpoint' => Setting::getSettings()->webhook_endpoint,
'event' => $event, '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.');
} }
} }
@ -197,14 +197,14 @@ class CheckoutableListener
} }
} catch (ClientException $e) { } catch (ClientException $e) {
Log::error("ClientException caught during checkin notification: " . $e->getMessage()); 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) { } catch (Exception $e) {
Log::error(ucfirst(Setting::getSettings()->webhook_selected) . ' webhook notification failed:', [ Log::error(ucfirst(Setting::getSettings()->webhook_selected) . ' webhook notification failed:', [
'error' => $e->getMessage(), 'error' => $e->getMessage(),
'webhook_endpoint' => Setting::getSettings()->webhook_endpoint, 'webhook_endpoint' => Setting::getSettings()->webhook_endpoint,
'event' => $event, '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.');
} }
} }