Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion jsonp catching bad request response (400) and such?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Aaron Newton  
View profile  
 More options Jul 6 2011, 11:28 pm
From: Aaron Newton <aa...@iminta.com>
Date: Wed, 6 Jul 2011 20:28:13 -0700
Local: Wed, Jul 6 2011 11:28 pm
Subject: Re: [Moo] jsonp catching bad request response (400) and such?

It's been so long since I wrote that code I can't say whether or not this is
true. I do recall spending time trying to offer a more robust error
reporting mechanism on it...

2011/7/6 Fábio M. Costa <fabio.co...@corp.globo.com>

> I've been thinking about an implementation of error detection.
> You can check if the script tag is loaded, this is cross-browser, so... If
> the script has loaded (independent of the http status code) and the callback
> has not executed, lets say 200 ms after, we can say that we got some kind of
> error.

> Still i can't tell you too much about what error it gave... but something
> didn't go ok and your data was not retrieved.

> Feedbacks?

> --
> Fábio Miranda Costa
> frontend@portalpadroes
> Globo.com
> *github:* fabiomcosta
> *twitter:* @fabiomiranda
> *ramal:* 6476

> On Wed, Jul 6, 2011 at 9:03 PM, Aaron Newton <aa...@iminta.com> wrote:

>> JSONP can't catch 400 errors because it's a callback system waiting for
>> the script to load. If the script fails, the callback is not invoked and so
>> it has no way of knowing that the script failed. The best it can do is be
>> given a timeout. If the request takes too long, or the script tag that is
>> injected fails to load, the timeout fires and you know it didn't load.

>> On Wed, Jul 6, 2011 at 2:22 PM, Rolf -nl <plentyofr...@gmail.com> wrote:

>>> Working with some api that can return a bad request code 400 error
>>> with the error message as a response in json. Is there a way I can use
>>> it? Because the response contains useful information about wrongly
>>> used params? There's a failure event, but that works with the timeout
>>> and I that's not really usable or the same.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.