Page MenuHomePhabricator

ApiSandbox breaks if the module sets an HTTP status code
Closed, ResolvedPublic

Description

While modules generally shouldn't do this, there are a few cases where it's ok (e.g. ApiCSPReport) and a few where people do it even though they shouldn't (e.g. JsonConfig's API modules).

There's probably no need for the pretty-printed output (either directly or via ApiSandbox) to return with a non-200 status code, instead this should be indicated in the displayed text somehow.

Details

Related Gerrit Patches:

Event Timeline

Anomie created this task.Nov 9 2016, 5:03 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 9 2016, 5:03 PM

Change 320615 had a related patch set uploaded (by Anomie):
API: Pretty-printed responses should always use HTTP status 200

https://gerrit.wikimedia.org/r/320615

Anomie moved this task from Unsorted to Needs Review on the MediaWiki-API board.Nov 9 2016, 5:05 PM

Change 320615 merged by jenkins-bot:
API: Pretty-printed responses should always use HTTP status 200

https://gerrit.wikimedia.org/r/320615

Anomie closed this task as Resolved.Nov 10 2016, 9:10 PM