1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-31 13:50:23 +02:00
* fix(twitch): log instead of exception

* typo
This commit is contained in:
Dag
2024-03-31 21:32:27 +02:00
committed by GitHub
parent 73289324bd
commit 17a3b4c9d8
2 changed files with 6 additions and 2 deletions

View File

@@ -121,7 +121,7 @@ class RedditBridge extends BridgeAbstract
$comments = false;
$frontend = $this->getInput('frontend');
if ($frontend == '') {
$frontend = 'https://old.reddit.com';
$frontend = 'https://old.reddit.com';
}
$section = $this->getInput('d');

View File

@@ -95,10 +95,14 @@ EOD;
if ($data->user === null) {
throw new \Exception(sprintf('Unable to find channel `%s`', $channel));
}
$user = $data->user;
if ($user->videos === null) {
throw new HttpException('Service Unavailable', 503);
// twitch regularly does this for unknown reasons
$this->logger->info('Twitch returned empty set of videos', ['data' => $data]);
return;
}
foreach ($user->videos->edges as $edge) {
$video = $edge->node;