Comments (6)
PD: Do you need an unit test showing the error? I can try to write a jasmine showing it
from backbone-couchdb.
That would be handy!
from backbone-couchdb.
I'm having the same problem. How do I get access to the actual error that was thrown during a save() ?
from backbone-couchdb.
Digging into it right now
from backbone-couchdb.
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:
myModel.fetch({error: function(model, req, options){
console.log(model, req, options);
}});
This would lead to the following console output:
Is this sufficient enough?
from backbone-couchdb.
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!
from backbone-couchdb.
Related Issues (20)
- bycollection view should probably return doc_.id instead of doc HOT 5
- Support for deletion changes? HOT 3
- Possibility to pass include_docs when reading from views HOT 4
- Unpatched Backbone.Model still remians in Backbone.Collection::model HOT 2
- Objects returned by Model.clone() contain _id and _rev attributes of the cloned object HOT 1
- fetch method on collection not returning deferred object HOT 6
- just bumped into bb-cdb again today HOT 2
- Add the option to use lists and shows HOT 2
- jquery.couch.js in README defunct HOT 1
- Question about views and filters HOT 1
- Support CouchDB _updates HOT 3
- Compatibility with backbone-relational.js HOT 1
- Register Bower Package HOT 1
- I don't think doc.doc is what is needed during a fetch
- Undeclared variable error in error handler HOT 5
- Add support for backbone 0.9.9 HOT 1
- Accept doc.key instead of doc.value for group-by/distinct mapreduce views
- Fetch does not return XHR
- Need a way to get a single model by a non-ID attrib
- License file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from backbone-couchdb.