Last modified: 2010-05-15 16:03:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 14758 - Invalid JSON produced by API when API error produced
Invalid JSON produced by API when API error produced
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
Depends on:
  Show dependency treegraph
Reported: 2008-07-08 15:14 UTC by Jools Wills
Modified: 2010-05-15 16:03 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Jools Wills 2008-07-08 15:14:12 UTC
If the api throws an error and the format is set to JSON, the error is additionally tagged onto the end of the JSON making it fail on JSON parsers.

for example

will produce

{"error":{"code":"unknown_action","info":"Unrecognized value for parameter 'action': invalid"}}unknown_action: Unrecognized value for parameter 'action': invalid

instead of

{"error":{"code":"unknown_action","info":"Unrecognized value for parameter 'action': invalid"}}
Comment 1 Roan Kattouw 2008-07-08 20:54:27 UTC
Fixed in r37349. The error handler called getAllowedParams() while it was being invoked because getAllowedParams() threw the error in question.

Note You need to log in before you can comment on or make changes to this bug.