From 2a29566458521bf7a56b2a8ab2845268ac4590da Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 10 Oct 2023 15:15:02 -0700 Subject: [PATCH] Catch all ClientExceptions on check out --- app/Listeners/CheckoutableListener.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index 917a037703..01e5041f67 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -63,13 +63,8 @@ class CheckoutableListener } } catch (Exception $e) { if ($e instanceof ClientException){ - $statusCode = $e->getResponse()->getStatusCode(); - // If status code is in 400 range, we don't want to log it as an error - // @todo: 300 and 500 as well? - if ($statusCode >= 400 && $statusCode < 500) { - Log::debug("Exception caught during checkout notification: ".$e->getMessage()); - return; - } + Log::debug("Exception caught during checkout notification: ".$e->getMessage()); + return; } Log::error("Exception caught during checkout notification: ".$e->getMessage());