mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
Log warning on failure to fetch foreign notifications
Change-Id: I92bc0ea2aebc1992d43dc0cd560137090b4d5857
This commit is contained in:
parent
52b60075d1
commit
f5e9d4e372
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use MediaWiki\Logger\LoggerFactory;
|
||||||
|
|
||||||
class ApiEchoNotifications extends ApiQueryBase {
|
class ApiEchoNotifications extends ApiQueryBase {
|
||||||
/**
|
/**
|
||||||
* @var EchoForeignNotifications
|
* @var EchoForeignNotifications
|
||||||
|
@ -379,6 +381,14 @@ 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 {
|
||||||
|
LoggerFactory::getInstance( 'Echo' )->warning(
|
||||||
|
"Failed to fetch notifications from {wiki}. Response: {response}",
|
||||||
|
array(
|
||||||
|
'wiki' => $wiki,
|
||||||
|
'response' => $response['response']['body'],
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue