mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Catch all ClientExceptions on check out
This commit is contained in:
parent
ab3a3de59b
commit
2a29566458
|
@ -63,14 +63,9 @@ class CheckoutableListener
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
if ($e instanceof ClientException){
|
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());
|
Log::debug("Exception caught during checkout notification: ".$e->getMessage());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Log::error("Exception caught during checkout notification: ".$e->getMessage());
|
Log::error("Exception caught during checkout notification: ".$e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue