I think it is terrible that the API doesn't make use of response codes more. As a javascript developer it seems completely wrong to me that I have to mix error handling with success handling.
I understand there are backward compatibility issues but it should be possible to access an alternative flavour of the API (E.g. accessed via http://en.wikipedia.org/w/apiv2.php)
for example it would...
return 404's when I request a page that doesn't exist
a 400 bad request when I provide the wrong parameters
and 403 Forbidden when I try to do something I am not authorised to do
Some of the time when writing code that error handles I want to be able to quickly handle errors without resorting to inspecting the contents of the response e.g. on a 403 I can deduce that the user is not logged in or has irrelevant permissions and trigger a relevant call to action (e.g. redirect to login page/inform the user they are trying to do something they are not supposed to).
The existing response text would be packaged in the response body for situations where it is really needed.
I believe such a change would make the API more attractive to developers and easier to explore. Please lets do something about this.
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
Version: unspecified
Severity: enhancement