Re: [twitter-dev] friendships/create method and 403 ambiguity
On Wed, Dec 16, 2009 at 6:02 AM, Marcel Molina wrote: > In the long term we plan to add internal error codes to every non 2** > response so that the consumer can unambiguously know what error they got > without munging error message strings (who's language might be changed > innocently not knowing the consequences). That'd be great. Currently I am using regular expression /Could\s+not\s+follow\s+user/i If there was any header like X-API-STATUS or X-TWITTER-ERRNO it'd be so easier to handle error. Thanks -- A K M Mokaddim My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest)
Re: [twitter-dev] friendships/create method and 403 ambiguity
In the long term we plan to add internal error codes to every non 2** response so that the consumer can unambiguously know what error they got without munging error message strings (who's language might be changed innocently not knowing the consequences). On Mon, Dec 14, 2009 at 2:42 PM, Mark McBride wrote: > The body of the response allows you to differentiate these two codes, e.g. > > curl -u -XPOST -d "" > http://twitter.com/friendships/create/atebits.xml > > > /friendships/create/atebits.xml > Could not follow user: atebits is already on your list. > > > > On Mon, Dec 14, 2009 at 2:38 PM, shiplu wrote: > > There are two phrases about friendships/create. > > > > 1. If you are already friends with the user an HTTP 403 will be > returned. > > 2. This method is subject to [1]update limits. An HTTP 403 will be > > returned if this limit as been hit. > > > > How to differ those two status codes? > > > > > > [1] http://help.twitter.com/forums/10711/entries/15364 > > > > -- > > A K M Mokaddim > > My talks, http://talk.cmyweb.net > > Follow me, http://twitter.com/shiplu > > Innovation distinguishes bet ... ... (ask Steve Jobs the rest) > > > > > > -- > ---Mark > > http://twitter.com/mccv > -- Marcel Molina Twitter Platform Team http://twitter.com/noradio
Re: [twitter-dev] friendships/create method and 403 ambiguity
The body of the response allows you to differentiate these two codes, e.g. curl -u -XPOST -d "" http://twitter.com/friendships/create/atebits.xml /friendships/create/atebits.xml Could not follow user: atebits is already on your list. On Mon, Dec 14, 2009 at 2:38 PM, shiplu wrote: > There are two phrases about friendships/create. > > 1. If you are already friends with the user an HTTP 403 will be returned. > 2. This method is subject to [1]update limits. An HTTP 403 will be > returned if this limit as been hit. > > How to differ those two status codes? > > > [1] http://help.twitter.com/forums/10711/entries/15364 > > -- > A K M Mokaddim > My talks, http://talk.cmyweb.net > Follow me, http://twitter.com/shiplu > Innovation distinguishes bet ... ... (ask Steve Jobs the rest) > -- ---Mark http://twitter.com/mccv
[twitter-dev] friendships/create method and 403 ambiguity
There are two phrases about friendships/create. 1. If you are already friends with the user an HTTP 403 will be returned. 2. This method is subject to [1]update limits. An HTTP 403 will be returned if this limit as been hit. How to differ those two status codes? [1] http://help.twitter.com/forums/10711/entries/15364 -- A K M Mokaddim My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu Innovation distinguishes bet ... ... (ask Steve Jobs the rest)