mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
Follow-up f5e9d4e
: log parsing failures and API errors too
Change-Id: Ie00994008aab632a9b02d11b840457e91546b12a
This commit is contained in:
parent
712109fa5d
commit
c7bdb879e6
|
@ -387,11 +387,13 @@ class ApiEchoNotifications extends ApiQueryBase {
|
||||||
if ( $parsed && isset( $parsed['query']['notifications'] ) ) {
|
if ( $parsed && isset( $parsed['query']['notifications'] ) ) {
|
||||||
$results[$wiki] = $parsed['query']['notifications'];
|
$results[$wiki] = $parsed['query']['notifications'];
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
if ( !isset( $results[$wiki] ) ) {
|
||||||
LoggerFactory::getInstance( 'Echo' )->warning(
|
LoggerFactory::getInstance( 'Echo' )->warning(
|
||||||
"Failed to fetch notifications from {wiki}. Response: {response}",
|
"Failed to fetch notifications from {wiki}. Response: {code} {response}",
|
||||||
array(
|
array(
|
||||||
'wiki' => $wiki,
|
'wiki' => $wiki,
|
||||||
|
'code' => $response['response']['code'],
|
||||||
'response' => $response['response']['body'],
|
'response' => $response['response']['body'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue