Failed update doesn't return an error message?

4 views
Skip to first unread message

Martin Omander

unread,
Jul 13, 2009, 7:38:56 PM7/13/09
to Twitter Development Talk
Hi there,

Earlier today I ran afoul of the rate limit for updates through the
API. But no error was returned to my app. To make sure my app wasn't
suppressing the error message, I sent an update using curl:

curl -u <username>:<password> -d "status=testing" http://twitter.com/statuses/update.xml
-D headerfile

The status wasn't updated and no error message was returned. The
headerfile contained HTTP return code 200. But when I tried to enter
an update for the same account through the web interface at
twitter.com, I got an error message saying that I had posted too many
updates in the last hour.

When I used the curl command above and the update failed, I did notice
that the returned <text> element did not contain the status text I had
sent. Instead it contained my last successful update from 30 minutes
earlier. When there is a successful update, the <text> element seems
to contain the status update I just sent.

Should I examine the <text> element to verify that the update worked,
instead of checking for HTTP error codes? Or was this just a temporary
glitch today?

All the best,

/Martin

Doug Williams

unread,
Jul 13, 2009, 8:52:12 PM7/13/09
to twitter-deve...@googlegroups.com
Martin,
This sounds like issue 795 [1].

When you get the 200, are you sending the same (duplicate) text as the last successful update? If so, this is the expected behavior.

However, if you are sending new (non duplicate) text and you are hitting the update limit, you should be receiving a HTTP 403 response code.

Can you specify exactly what you are doing so we can debug?

1. http://code.google.com/p/twitter-api/issues/detail?id=795

Thanks,
Doug

Martin Omander

unread,
Jul 14, 2009, 7:40:45 PM7/14/09
to Twitter Development Talk
Doug,

Thanks for your prompt reply.

Yes, it does sound like issue 795. I am sending a new, non-duplicate,
update. My app just ran into the rate limit again. I verified by
trying to post an update on twitter.com and got the message "Wow,
that's a lot of Twittering! You have reached your limit
of updates for the hour. Try again later."

While my account (@martins_test) was in this state, I sent this:

curl -u <username>:<password> -d "status=testing" http://twitter.com/statuses/update.xml
-D headerfile

The XML response contained the text of the last successful status
update. The HTTP headers started with

HTTP/1.1 200 OK

In other words, this is the same problem I ran into yesterday. Is
there any other data that would help troubleshoot this?

All the best,

/Martin



On Jul 13, 5:52 pm, Doug Williams <d...@twitter.com> wrote:
> Martin,
> This sounds like issue 795 [1].
>
> When you get the 200, are you sending the same (duplicate) text as the last
> successful update? If so, this is the expected behavior.
>
> However, if you are sending new (non duplicate) text and you are hitting the
> update limit, you should be receiving a HTTP 403 response code.
>
> Can you specify exactly what you are doing so we can debug?
>
> 1.http://code.google.com/p/twitter-api/issues/detail?id=795

Doug Williams

unread,
Jul 14, 2009, 8:05:54 PM7/14/09
to twitter-deve...@googlegroups.com
Sounds like we have all we need. Thanks for the help, Martin. I'll add
a link to this thread to the bug report for posterity.

Thanks,
Doug

Martin Omander

unread,
Jul 16, 2009, 6:33:31 PM7/16/09
to Twitter Development Talk
Hi again,

I just wanted to let everyone know that this problem does not occur
today. When I go over the API limit, I'm getting status code 403 back.
Yesterday I got status code 200 (OK) back, which made things hard.
This fix really helps us developers. Thank you, Twitters!

/Martin

eaonflux eaonflux

unread,
Aug 1, 2009, 2:51:28 PM8/1/09
to Twitter Development Talk
Bummer, i have this prob also.
still getting a response code of 200, while the update isnt a dupe.

i am making an intergration for wordpress but without a proper
response code there is no way to check your update rate limit.

hope to see it fixed.

grts,

eaonflux
Reply all
Reply to author
Forward
0 new messages