MediaWiki API 结果
这是JSON格式的HTML实现。HTML对调试很有用,但不适合应用程序使用。
指定format参数以更改输出格式。要查看JSON格式的非HTML实现,设置format=json。
{ "error": { "code": "internal_api_error_Wikimedia\\Assert\\PreconditionException", "info": "[64a2bab9b9c548deb57919c6f0d224d5] Exception caught: Precondition failed: This Title instance does not represent a proper page, but merely a link target.", "errorclass": "Wikimedia\\Assert\\PreconditionException", "*": "Wikimedia\\Assert\\PreconditionException at /var/www/mediawiki/vendor/wikimedia/assert/src/Assert.php(49)\nfrom /var/www/mediawiki/vendor/wikimedia/assert/src/Assert.php(49)\n#0 /var/www/mediawiki/includes/title/Title.php(4251): Wikimedia\\Assert\\Assert::precondition()\n#1 /var/www/mediawiki/includes/title/Title.php(4232): MediaWiki\\Title\\Title->assertProperPage()\n#2 /var/www/mediawiki/includes/Revision/RevisionStore.php(1831): MediaWiki\\Title\\Title->getId()\n#3 /var/www/mediawiki/includes/Revision/RevisionStore.php(1736): MediaWiki\\Revision\\RevisionStore->ensureRevisionRowMatchesPage()\n#4 /var/www/mediawiki/includes/Revision/RevisionStore.php(1612): MediaWiki\\Revision\\RevisionStore->newRevisionFromRowAndSlots()\n#5 /var/www/mediawiki/includes/api/ApiFeedContributions.php(243): MediaWiki\\Revision\\RevisionStore->newRevisionFromRow()\n#6 /var/www/mediawiki/includes/api/ApiFeedContributions.php(212): ApiFeedContributions->feedItem()\n#7 /var/www/mediawiki/includes/api/ApiMain.php(1907): ApiFeedContributions->execute()\n#8 /var/www/mediawiki/includes/api/ApiMain.php(884): ApiMain->executeAction()\n#9 /var/www/mediawiki/includes/api/ApiMain.php(855): ApiMain->executeActionWithErrorHandling()\n#10 /var/www/mediawiki/api.php(91): ApiMain->execute()\n#11 /var/www/mediawiki/api.php(46): wfApiMain()\n#12 {main}" } }