twurl block is sending 502 even when it succeeds

8 views
Skip to first unread message

TJ Luoma

unread,
Dec 30, 2010, 5:34:10 PM12/30/10
to twitter-deve...@googlegroups.com
I am trying to block users on the command line like this:

twurl -t -d "screen_name=$1" "/1/blocks/create.xml"

I am consistently getting

-> "HTTP/1.1 502 Bad Gateway\r\n"

as a response to this (Twitter Over Capacity) even when it works
(verified via API and via website)

Is this why so few 3rd party apps can successfully block? Because the
API gives bad information? I've had to follow every blocks/create with
a blocks/exists to see if it really worked or not.

TjL

Matt Harris

unread,
Jan 4, 2011, 2:00:15 PM1/4/11
to twitter-deve...@googlegroups.com
Hi TjL,

The API can occasionally return a Twitter Over Capacity error when the site is experiencing a lot traffic. If this happens waiting a little white and trying the request again will work.

I notice you are using a variable for the screen_name. Is this being set correctly in your environment?

Best
@themattharris
Developer Advocate, Twitter
http://twitter.com/themattharris



--
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

Thomas Woolway

unread,
Mar 14, 2011, 12:20:40 PM3/14/11
to twitter-deve...@googlegroups.com, Matt Harris
Hi Matt,

We've been seeing this for a while - the block and report spam calls always return 502s (with a full page of HTML), even though they actually succeed. This doesn't seem to be tied into the stability of the rest of the API. This is happening across all of our clients, including those that use .xml and .json resources.

Any chance that you could have a look into this? I can provide you with more information if required,

Best,

Tom
Reply all
Reply to author
Forward
0 new messages