Since sometime today I have been noticing the following:
GET
http://twitter.com/statuses/friends_timeline/decklin.json --> 200
OK
Cache-Control: max-age=300
Connection: close
Date: Wed, 02 Jul 2008 17:02:03 GMT
Accept-Ranges: bytes
Server: Apache
Content-Length: 75
Content-Type: application/json; charset=utf-8
Expires: Wed, 02 Jul 2008 17:07:03 GMT
Last-Modified: Wed, 02 Jul 2008 16:41:38 GMT
Client-Date: Wed, 02 Jul 2008 17:02:03 GMT
Client-Peer:
128.121.146.100:80
Client-Response-Num: 1
{"error":"Twitter is down for maintenance. It will return in 10
minutes."}
The headers are normal. The content is fine, although IIRC the JSON is
usually a list and not a hash (I guess I should check for that). The
problem is the HTTP status code; it should clearly be 503 or something
like that.
I would really not prefer to dig into the returned content and try to
test for/parse weird error messages when I can (and do) already handle
HTTP errors in a defined way. Can this be fixed?