mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
feat: refactor code and improve readability
This commit is contained in:
@@ -27,12 +27,12 @@ class SaleController extends Controller
|
||||
|
||||
return $response;
|
||||
});
|
||||
} catch (\Exception $e) {
|
||||
if ($e->getMessage() === 'Trying to access array offset on value of type null') {
|
||||
} catch (\Exception $exception) {
|
||||
if ($exception->getMessage() === 'Trying to access array offset on value of type null') {
|
||||
logger()->error('LMI has broken');
|
||||
abort(503, 'Sorry, the Sale Rotation is currently under maintenance. Please try again later.');
|
||||
} else {
|
||||
logger()->error('An error occurred while trying to fetch the Sale Rotation', ['error' => $e->getMessage()]);
|
||||
logger()->error('An error occurred while trying to fetch the Sale Rotation', ['error' => $exception->getMessage()]);
|
||||
abort(500, 'Sorry, an error occurred while trying to fetch the Sale Rotation. Please try again later.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user