Ok, here's the problem. I've an api that will give me back a json. With success I'll have back a nice list with some values, with an error I'll receive a json containing sone information about the error. I still haven't tried the "success" case because I still have to deploy the api but I think should work. The problem for now is the "error" case. Using $.ajax in case of error I'm going to receive three parameters, a xhrequest (or similar), a message and I don't remember.. How can I handle this? In the response body shoulde be a json, where can I find it?
Thanks for any help, sorry for no code or the poor indentantion but I'm writing from my mobile!