Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/92193
Change subject: API: Fix possible errors to avoid Unknown error ...................................................................... API: Fix possible errors to avoid Unknown error Add a missing one. The error text must be repeated in the possible error list. Change-Id: Id6ab454012bb0aacab323ece96336b768ca1d4f9 --- M api/ApiQueryCheckUser.php M api/ApiQueryCheckUserLog.php 2 files changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/93/92193/1 diff --git a/api/ApiQueryCheckUser.php b/api/ApiQueryCheckUser.php index 99ea444..966bcc4 100644 --- a/api/ApiQueryCheckUser.php +++ b/api/ApiQueryCheckUser.php @@ -264,11 +264,12 @@ public function getPossibleErrors() { return array_merge( parent::getPossibleErrors(), array( - array( 'nosuchuser' ), - array( 'invalidip' ), - array( 'permissionerror' ), - array( 'invalidmode' ), - array( 'missingdata' ), + array( 'code' => 'nosuchuser', 'info' => 'Target user does not exist' ), + array( 'code' => 'invalidip', 'info' => 'IP or range is invalid' ), + array( 'code' => 'permissionerror', 'info' => 'You need the checkuser right' ), + array( 'code' => 'invalidmode', 'info' => 'Invalid request mode' ), + array( 'code' => 'missingdata', 'info' => 'You must define reason for check' ), + array( 'code' => 'invalidtime', 'info' => 'You need use correct time limit (like "2 weeks")' ), ) ); } diff --git a/api/ApiQueryCheckUserLog.php b/api/ApiQueryCheckUserLog.php index 84e5c7d..c143328 100644 --- a/api/ApiQueryCheckUserLog.php +++ b/api/ApiQueryCheckUserLog.php @@ -135,7 +135,7 @@ public function getPossibleErrors() { return array_merge( parent::getPossibleErrors(), array( - array( 'permissionerror' ), + array( 'code' => 'permissionerror', 'info' => 'You need the checkuser-log right' ), ) ); } -- To view, visit https://gerrit.wikimedia.org/r/92193 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id6ab454012bb0aacab323ece96336b768ca1d4f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits