mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-13 20:14:10 +02:00
feat: introduce RateLimitException (#4199)
This commit is contained in:
@@ -121,8 +121,12 @@ class DisplayAction implements ActionInterface
|
||||
$items = $feedItems;
|
||||
}
|
||||
$feed = $bridge->getFeed();
|
||||
} catch (\Exception $e) {
|
||||
// Probably an exception inside a bridge
|
||||
} catch (\Throwable $e) {
|
||||
if ($e instanceof RateLimitException) {
|
||||
// These are internally generated by bridges
|
||||
$this->logger->info(sprintf('RateLimitException in DisplayAction(%s): %s', $bridge->getShortName(), create_sane_exception_message($e)));
|
||||
return new Response(render(__DIR__ . '/../templates/exception.html.php', ['e' => $e]), 429);
|
||||
}
|
||||
if ($e instanceof HttpException) {
|
||||
// Reproduce (and log) these responses regardless of error output and report limit
|
||||
if ($e->getCode() === 429) {
|
||||
|
Reference in New Issue
Block a user