Don't use RequestException
In https://phabricator.wikimedia.org/T332948#8822212 I encountered an issue where exceptions seemed to be held in memory longer than they should.
I'm not sure why this is, but I'm wondering if it had something to do with the response refernce on the requests RequestException? I probably shouldn't have used this anyway. Now raising a custom MediaWikiApiError instead, without a reference to the response object.
Also call response.raise_for_status before proceeding, in case there was an HTTP status error.
Bug: T332948