You check the status response code. If the code is 404, literally, it failed. That will happen in the onFailure() callback on a request object, but if the server returns invalid data, but a 200 OK response,

It is your problem to detect and account for any problems.
JSON.decode() might work to return null, or an empty object that you might test ?

On 4/9/2011 1:46 AM, bootle wrote:
Thanks for your answer. Sorry - this was just an example, I typed it
as a quick thought shortcut - the server basically returns any HTML
content instead of a JSON response, let's say a 404 error page.

Regards,
Matt

On Apr 8, 1:23 am, Sean McArthur<[email protected]>  wrote:
You can't do a regular Request to another domain, because of cross-domain
restrictions.

Reply via email to