MediaWiki API 結果
这是JSON格式的HTML实现。HTML对调试很有用,但不适合应用程序使用。
指定format参数以更改输出格式。要查看JSON格式的非HTML实现,设置format=json。
{
"error": {
"code": "internal_api_error_DBConnectionError",
"info": "[1652e1a2d218b02532cdaf47] Exception caught: A database query error has occurred. This may indicate a bug in the software.",
"*": "Wikimedia\\Rdbms\\DBConnectionError at /var/www/mediawiki/includes/libs/rdbms/database/Database.php(1004)\n#0 /var/www/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1134): Wikimedia\\Rdbms\\Database->reportConnectionError(string)\n#1 /var/www/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(749): Wikimedia\\Rdbms\\LoadBalancer->reportConnectionError()\n#2 /var/www/mediawiki/includes/GlobalFunctions.php(2801): Wikimedia\\Rdbms\\LoadBalancer->getConnection(integer, array, boolean)\n#3 /var/www/mediawiki/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(96): wfGetDB(integer)\n#4 /var/www/mediawiki/includes/libs/objectcache/WANObjectCache.php(1240): MediaWikiGadgetsDefinitionRepo->{closure}(boolean, integer, array, NULL)\n#5 /var/www/mediawiki/includes/libs/objectcache/WANObjectCache.php(1114): WANObjectCache->doGetWithSetCallback(string, integer, Closure, array)\n#6 /var/www/mediawiki/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(106): WANObjectCache->getWithSetCallback(string, integer, Closure, array)\n#7 /var/www/mediawiki/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(31): MediaWikiGadgetsDefinitionRepo->loadGadgets()\n#8 /var/www/mediawiki/extensions/Gadgets/includes/GadgetRepo.php(71): MediaWikiGadgetsDefinitionRepo->getGadgetIds()\n#9 /var/www/mediawiki/extensions/Gadgets/includes/GadgetHooks.php(47): GadgetRepo->getStructuredList()\n#10 /var/www/mediawiki/includes/Hooks.php(177): GadgetHooks::userGetDefaultOptions(array)\n#11 /var/www/mediawiki/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)\n#12 /var/www/mediawiki/includes/user/User.php(1751): Hooks::run(string, array)\n#13 /var/www/mediawiki/includes/user/User.php(5438): User::getDefaultOptions()\n#14 /var/www/mediawiki/includes/user/User.php(3095): User->loadOptions()\n#15 /var/www/mediawiki/includes/context/RequestContext.php(336): User->getOption(string)\n#16 /var/www/mediawiki/includes/context/DerivativeContext.php(261): RequestContext->getLanguage()\n#17 /var/www/mediawiki/includes/context/ContextSource.php(129): DerivativeContext->getLanguage()\n#18 /var/www/mediawiki/includes/api/ApiHelp.php(44): ContextSource->getLanguage()\n#19 /var/www/mediawiki/includes/api/ApiMain.php(1579): ApiHelp->execute()\n#20 /var/www/mediawiki/includes/api/ApiMain.php(535): ApiMain->executeAction()\n#21 /var/www/mediawiki/includes/api/ApiMain.php(506): ApiMain->executeActionWithErrorHandling()\n#22 /var/www/mediawiki/api.php(94): ApiMain->execute()\n#23 {main}"
}
}