mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-14 22:52:34 +02:00
fix: throw client exception in some bridges (#4661)
Some checks failed
Documentation / documentation (push) Has been cancelled
Lint / executable_php_files_check (push) Has been cancelled
Tests / phpunit8 (7.4) (push) Has been cancelled
Tests / phpunit8 (8.0) (push) Has been cancelled
Tests / phpunit8 (8.1) (push) Has been cancelled
Tests / phpunit8 (8.2) (push) Has been cancelled
Tests / phpunit8 (8.3) (push) Has been cancelled
Tests / phpunit8 (8.4) (push) Has been cancelled
Build Image on Commit and Release / bake (push) Has been cancelled
Lint / phpcs (7.4) (push) Has been cancelled
Lint / phpcompatibility (7.4) (push) Has been cancelled
Some checks failed
Documentation / documentation (push) Has been cancelled
Lint / executable_php_files_check (push) Has been cancelled
Tests / phpunit8 (7.4) (push) Has been cancelled
Tests / phpunit8 (8.0) (push) Has been cancelled
Tests / phpunit8 (8.1) (push) Has been cancelled
Tests / phpunit8 (8.2) (push) Has been cancelled
Tests / phpunit8 (8.3) (push) Has been cancelled
Tests / phpunit8 (8.4) (push) Has been cancelled
Build Image on Commit and Release / bake (push) Has been cancelled
Lint / phpcs (7.4) (push) Has been cancelled
Lint / phpcompatibility (7.4) (push) Has been cancelled
This commit is contained in:
parent
a599f4ba83
commit
37174f01e5
4 changed files with 5 additions and 5 deletions
|
@ -290,7 +290,7 @@ class TwitterClient
|
|||
$response = Json::decode(getContents($url, $this->createHttpHeaders()), false);
|
||||
if (isset($response->errors)) {
|
||||
// Grab the first error message
|
||||
throw new \Exception(sprintf('From twitter api: "%s"', $response->errors[0]->message));
|
||||
throwClientException(sprintf('From twitter api: "%s"', $response->errors[0]->message));
|
||||
}
|
||||
$userInfo = $response->data->user;
|
||||
$this->data[$screenName] = $userInfo;
|
||||
|
@ -423,7 +423,7 @@ class TwitterClient
|
|||
$response = Json::decode(getContents($url, $this->createHttpHeaders()), false);
|
||||
if (isset($response->errors)) {
|
||||
// Grab the first error message
|
||||
throw new \Exception(sprintf('From twitter api: "%s"', $response->errors[0]->message));
|
||||
throwClientException(sprintf('From twitter api: "%s"', $response->errors[0]->message));
|
||||
}
|
||||
$listInfo = $response->data->user_by_screen_name->list;
|
||||
$this->data[$screenName . '-' . $listSlug] = $listInfo;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue