My favorites | Sign in
Project Logo
       
New issue | Search
for
| Advanced search | Search tips
Issue 300: Error Message returned during downtime doesn't match documented error format
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  alexfpayne
Closed:  Apr 2009
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by eric.s.blair, Feb 18, 2009
What's the problem you're seeing?

According to the documentation, the error tag returned via the API (for XML
requests) is:
<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <request>/direct_messages/destroy/456.xml</request>
  <error>No direct message with that ID found.</error>
</hash>

Right now, that API returns this message:
<?xml version="1.0" encoding="UTF-8"?>
<error reason="Planned maintenance" deadline="about an hour">
  Twitter is down for Planned maintenance. It will return in about an hour.
</error>

Has the offline message always looked like this or is it new? Tonight's the
first time I noticed it and it sent me scrambling to update my error processor.
Comment 1 by alexfpayne, Mar 03, 2009
That's definitely new. Ugh.
Status: Accepted
Comment 2 by marc.mims, Apr 07, 2009
In addition, downtime error (seen on 06 Apr 2009) returns HTTP status code 200. 
Shouldn't it return 503?

I had application code blow up because friends_timeline returned status code 200, but
did NOT return the expected array of statuses.  It returned the error hash, instead.
 Had it returned an HTTP failure code, my app would have handled it.

It will be burdensome to check every successful (200) return to see if it is a hash
with an "error" key, and translate it to an error in the app, but that's the
workaround if the API isn't changed to send an HTTP failure code.

Should this be posted as a new issue?
Comment 3 by alexfpayne, Apr 20, 2009
(No comment was entered for this change.)
Owner: alexfpayne
Comment 4 by igudo1, Apr 21, 2009
(No comment was entered for this change.)
Status: Fixed
Sign in to add a comment

Hosted by Google Code