Page MenuHomePhabricator

Add API error response tests for all Retrofit MediaWiki API clients
Closed, ResolvedPublic

Description

We currently test for malformed responses and 404s but not for 200 responses that contain an API error message, such as:

{
  "error": {
    "code": "unknown_action",
    "info": "Unrecognized value for parameter \"action\": oscillate.",
    "*": "See https://en.wikipedia.org/w/api.php for API usage."
  },
  "servedby": "mw1286"
}

We should add such tests to our Retrofit MW API clients to ensure that they're handling these error responses correctly.