Index: trunk/phase3/includes/api/ApiQueryAllLinks.php |
— | — | @@ -188,6 +188,15 @@ |
189 | 189 | public function getDescription() { |
190 | 190 | return 'Enumerate all links that point to a given namespace'; |
191 | 191 | } |
| 192 | + |
| 193 | + public function getPossibleErrors() { |
| 194 | + return array_merge( parent::getPossibleErrors(), array( |
| 195 | + array( 'code' => 'params', 'info' => $this->getModuleName() . ' cannot be used as a generator in unique links mode' ), |
| 196 | + array( 'code' => 'params', 'info' => $this->getModuleName() . ' cannot return corresponding page ids in unique links mode' ), |
| 197 | + array( 'code' => 'params', 'info' => 'alcontinue and alfrom cannot be used together' ), |
| 198 | + array( 'code' => 'badcontinue', 'info' => 'Invalid continue parameter' ), |
| 199 | + ) ); |
| 200 | + } |
192 | 201 | |
193 | 202 | protected function getExamples() { |
194 | 203 | return array ( |
Index: trunk/phase3/includes/api/ApiParse.php |
— | — | @@ -306,6 +306,15 @@ |
307 | 307 | public function getDescription() { |
308 | 308 | return 'This module parses wikitext and returns parser output'; |
309 | 309 | } |
| 310 | + |
| 311 | + public function getPossibleErrors() { |
| 312 | + return array_merge( parent::getPossibleErrors(), array( |
| 313 | + array( 'code' => 'params', 'info' => 'The page parameter cannot be used together with the text and title parameters' ), |
| 314 | + array( 'code' => 'missingrev', 'info' => 'There is no revision ID oldid' ), |
| 315 | + array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to view deleted revisions' ), |
| 316 | + array( 'code' => 'missingtitle', 'info' => 'The page you specified doesn\'t exist' ), |
| 317 | + ) ); |
| 318 | + } |
310 | 319 | |
311 | 320 | protected function getExamples() { |
312 | 321 | return array ( |
Index: trunk/phase3/includes/api/ApiQueryBacklinks.php |
— | — | @@ -458,6 +458,8 @@ |
459 | 459 | return array_merge( parent::getPossibleErrors(), array( |
460 | 460 | array( 'invalidtitle', 'title' ), |
461 | 461 | array( 'missingparam', 'title' ), |
| 462 | + array( 'code' => 'bad_image_title', 'info' => "The title for {$this->getModuleName()} query must be an image" ), |
| 463 | + array( 'code' => '_badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ), |
462 | 464 | ) ); |
463 | 465 | } |
464 | 466 | |
Index: trunk/phase3/includes/api/ApiQueryBlocks.php |
— | — | @@ -257,6 +257,15 @@ |
258 | 258 | public function getDescription() { |
259 | 259 | return 'List all blocked users and IP addresses.'; |
260 | 260 | } |
| 261 | + |
| 262 | + public function getPossibleErrors() { |
| 263 | + return array_merge( parent::getPossibleErrors(), array( |
| 264 | + array( 'code' => 'usersandip', 'info' => 'bkusers and bkip cannot be used together' ), |
| 265 | + array( 'code' => 'cidrtoobroad', 'info' => 'CIDR ranges broader than /16 are not accepted' ), |
| 266 | + array( 'code' => 'param_user', 'info' => 'User parameter may not be empty' ), |
| 267 | + array( 'code' => 'param_user', 'info' => 'User name user is not valid' ), |
| 268 | + ) ); |
| 269 | + } |
261 | 270 | |
262 | 271 | protected function getExamples() { |
263 | 272 | return array ( 'api.php?action=query&list=blocks', |
Index: trunk/phase3/includes/api/ApiEditPage.php |
— | — | @@ -378,6 +378,8 @@ |
379 | 379 | array( 'editconflict' ), |
380 | 380 | array( 'emptynewsection' ), |
381 | 381 | array( 'unknownerror', 'retval' ), |
| 382 | + array( 'code' => 'nosuchsection', 'info' => '' ), "There is no section section.", '' |
| 383 | + array( 'code' => 'invalidsection', 'info' => 'The section parameter must be set to an integer or \'new\'' ), |
382 | 384 | ) ); |
383 | 385 | } |
384 | 386 | |
Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -543,6 +543,10 @@ |
544 | 544 | public function getPossibleErrors() { |
545 | 545 | return array_merge( parent::getPossibleErrors(), array( |
546 | 546 | array( 'readonlytext' ), |
| 547 | + array( 'code' => 'unknown_format', 'info' => 'Unrecognized format: format' ), |
| 548 | + array( 'code' => 'unknown_action', 'info' => 'The API requires a valid action parameter' ), |
| 549 | + array( 'code' => 'maxlag', 'info' => 'Waiting for host: x seconds lagged' ), |
| 550 | + array( 'code' => 'maxlag', 'info' => 'Waiting for a database server: x seconds lagged' ), |
547 | 551 | ) ); |
548 | 552 | } |
549 | 553 | |