I might be understanding wrong, but when I do:
$ curl "http://twitter.com/statuses/user_timeline.json?
id=twitter2222&callback=bar"
I get:
bar({"request":"/statuses/user_timeline.json?
id=twitter2222&callback=bar","error":"Not found"})
Isn't that what you're asking for?
David
On Sep 30, 10:53 am, Vision Jinx <[email protected]> wrote:
> Hi group and Twitter team,
>
> Still having issues working with the Twitter API, main concerns are
> things like when making JSONP requests to say accounts that don't
> exists (like in the case of a typo etc) I just get a null header or
> 404 page.
>
> To me when making a RESTful JSONP query it should still return a JSON
> string of some sort with the error code and reason or message etc.
>
> Twitter, can you please implement this into your API so it will return
> JSON on failed calls, getting a null header or a 404 page just breaks
> my apps since no data is ever returned as JSON.
>
> Eg.http://twitter.com/statuses/user_timeline.json?id=twitter2222&callbac...
>
> I would like to see at minimum...
>
> bar({"error":"404","status":"Sorry, that user doesn’t exist!"});
>
> (or account deleted or suspended user etc etc etc)
>
> It seems without any data being returned I need to put my queries on
> timers with a retry flag or something (not what I really want to do)
> and such to try again to see if there was latency in the API and then
> generate an unknown error with an "Ummm... Something did not happen
> but I don't know what" message o.O These extra requests also seem to
> count towards the API limits too.
>
> Any suggestions from other Devs on how you deal with this please let
> me know also (since your callback function never gets called) and am
> hoping this will get resolved by the Twitter team soon. (does not seem
> like a hard fix to implement)
>
> I at least see with the JSONP search queries they have this....
>
> Eg.http://search.twitter.com/search.json?q=hsdfkhksjdfusdh&callback=bar
>
> Retruns:
>
> bar({"results":[],"max_id":-1,"since_id":0,"results_per_page":
> 15,"page":1,"completed_in":0.010536,"query":"hsdfkhksjdfusdh"});
>
> Thanks for any suggestions! :)
>
> Cheers!
> Vision Jinx