New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ajax success/error handlers #23
Comments
Do you want handlers that run for all requests under one resource? or do you want handlers for one particular request? |
for one particular request. mainly for update resource requests. but for GET method i want handle internal server side script errors contains in data argument. for example: restAjaxOptions = {
success: function(data, textStatus, jqXHR) {
if (data.rc == -1) {
alert("data too big");
} else {
// bla-bla-bla
}
},
//...
}; maybe there is another way? |
So client.foo.update({test:42}).done(successHandler);
client.foo.update({test:42}).fail(errorHandler);
//where errorHandler is function(xhr, result, statusText){...} |
ok. thank you. 👍 |
hi.
something is wrong...
(for all requests server status is 200)
console log:
console log:
how can i pass the error handlers for each resource request?
thx.
The text was updated successfully, but these errors were encountered: