Page MenuHomePhabricator

Add Application errors for MediaWiki API to x-analytics
Closed, DeclinedPublic

Description

Add Application errors for Mediawiki API to x-analytics

Sounds like application errors are reported to MediaWiki-API-Error header when an API request is in error. Adding this field to x-Analytics allows us to be able to quantify API errors using webrequest table.

Now, this doesn't include errors like 404s or 503 so only part of the errors from the API will be reported.

Event Timeline

Nuria assigned this task to bd808.
Nuria raised the priority of this task from to Medium.
Nuria updated the task description. (Show Details)
Nuria added subscribers: Nuria, Ottomata, Spage and 3 others.

Now, this doesn't include errors like 404s or 503 so only part of the errors from the API will be reported.

The API never generates 404s, and never intentionally generates 5xx (they only get generated in case of PHP fatals or things being so badly screwed up that exceptions aren't being caught). A 400 might be generated by certain special actions that can't report errors in a normal way (e.g. the proposed TimedMediaHandler action=timedtext that doesn't return a normal API-formatted response, or possibly the various feed modules in the future), and a CORS failure may return a 403 in line with the CORS specification (which isn't strictly "API" since it's at the level of the HTTP transport rather than the API itself).

bd808 removed bd808 as the assignee of this task.Oct 29 2015, 5:33 PM
Reedy renamed this task from Add Application errors for Mediawiki API to x-analytics to Add Application errors for MediaWiki API to x-analytics .Jul 29 2025, 2:33 PM

Hm, I'm not sure if this is a task we'd ever do? Probably better would be instrument API requests with this info, rather than add it into the webrequest firehose.

Task is very old, so I'm going to be bold and decline.