-
Notifications
You must be signed in to change notification settings - Fork 54
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
Problem with the error handler on update error #20
Comments
PD: Do you need an unit test showing the error? I can try to write a jasmine showing it |
That would be handy! |
I'm having the same problem. How do I get access to the actual error that was thrown during a save() ? |
Digging into it right now |
Unfortunately there's no way to access the response itself since jquery.couch.js does not pass it to the error-callback. But I added a new object that will be passed to error-callbacks that accumulates at least some information on the request. A simple example for an error callback for a non-existing model:
This would lead to the following console output: Is this sufficient enough? |
sorry for the late response, I always miss github notifications. Backbone return the response so the user could check the error, so returning the error instead is pretty close. Thanks! |
I'm using this project for the first time. This are the steps to reproduce the error:
According to http://documentcloud.github.com/backbone/#Model-save, the error callback should get the model and the response.
NOTE: Maybe this is because couchdb, and response can't be returned, I'm not sure, I don't know this project or couchdb well enough to be sure.
The text was updated successfully, but these errors were encountered: