Hello,

It occurs from time to time that the rest api servers don't deliver
responses, and I'm not complaining about that.

However, why would the server answer with a 500 Http status code, a content
type of application/json and the content being the html error page.

E.g.,

GET /1/statuses/friends.json?cursor=1346292258256227567&user_id=33307124
HTTP/1.1
Accept-Encoding: identity
Host: api.twitter.com
Connection: close
User-Agent: Python-urllib/2.6

HTTP/1.1 500 Internal Server Error
Date: Sat, 11 Sep 2010 01:56:02 GMT
Server: hi
Status: 500 Internal Server Error
X-Transaction: 1284170160-87257-46051
X-RateLimit-Limit: 20000
Last-Modified: Sat, 11 Sep 2010 01:56:00 GMT
X-RateLimit-Remaining: 11250
Content-Type: application/json; charset=utf-8
Content-Length: 4659
Pragma: no-cache

....

Connection: close

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en-us" />
    <title>Twitter / Error</title>
    <link href="http://s.twimg.com/images/favicon.ico"; rel="shortcut icon"
type="image/x-icon" />

....

thx

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en

Reply via email to