mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-20 07:11:43 +02:00
refactor: extract exception and cache middleware (#4248)
This commit is contained in:
15
index.php
15
index.php
@@ -63,13 +63,8 @@ if ($argv) {
|
||||
$request = Request::fromGlobals();
|
||||
}
|
||||
|
||||
try {
|
||||
$rssBridge = new RssBridge($container);
|
||||
$response = $rssBridge->main($request);
|
||||
$response->send();
|
||||
} catch (\Throwable $e) {
|
||||
// Probably an exception inside an action
|
||||
$logger->error('Exception in RssBridge::main()', ['e' => $e]);
|
||||
$response = new Response(render(__DIR__ . '/templates/exception.html.php', ['e' => $e]), 500);
|
||||
$response->send();
|
||||
}
|
||||
$rssBridge = new RssBridge($container);
|
||||
|
||||
$response = $rssBridge->main($request);
|
||||
|
||||
$response->send();
|
Reference in New Issue
Block a user