mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-26 09:34:46 +02:00
fix: throw client exception in some bridges (#4661)
This commit is contained in:
@@ -59,7 +59,7 @@ class ImgsedBridge extends BridgeAbstract
|
||||
$this->collectTaggeds();
|
||||
}
|
||||
} catch (HttpException $e) {
|
||||
throw new \Exception(sprintf('Unable to find user `%s`', $username));
|
||||
throwClientException(sprintf('Unable to find user `%s`', $username));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -61,7 +61,7 @@ class TelegramBridge extends BridgeAbstract
|
||||
|
||||
$messages = $dom->find('div.tgme_widget_message_wrap.js-widget_message_wrap');
|
||||
if (!$channelTitle && !$messages) {
|
||||
throw new \Exception('Unable to find channel. The channel is non-existing or non-public.');
|
||||
throwClientException('Unable to find channel. The channel is non-existing or non-public.');
|
||||
}
|
||||
|
||||
foreach (array_reverse($messages) as $message) {
|
||||
|
@@ -93,7 +93,7 @@ EOD;
|
||||
$response = $this->apiRequest($query, $variables);
|
||||
$data = $response->data;
|
||||
if ($data->user === null) {
|
||||
throw new \Exception(sprintf('Unable to find channel `%s`', $channel));
|
||||
throwClientException(sprintf('Unable to find channel `%s`', $channel));
|
||||
}
|
||||
|
||||
$user = $data->user;
|
||||
|
Reference in New Issue
Block a user