Closed dlecan closed 10 years ago
Some errors returned by server are lost when, for eg., a bad predicate is provided.
Prismic.all().then(function(data) { self.data = data; // If server error, data is null });
If I want to chain several http calls, I can't chain promises because I need to test data content.
data
A better design is to handle error here and here and to reject the promise.
Strangely, this design is already used here and here.
Do you agree ?
I totally agree! If you want you can send me a pull request if you like?
Some errors returned by server are lost when, for eg., a bad predicate is provided.
If I want to chain several http calls, I can't chain promises because I need to test
data
content.A better design is to handle error here and here and to reject the promise.
Strangely, this design is already used here and here.
Do you agree ?