-
Notifications
You must be signed in to change notification settings - Fork 14
Description
I confused myself over this today and it became a problem
I want to do this:
each($.data, get()
.then(...)
.catch(...)
)
Ie for each item, I call get(), and I do one thing if the request succeeds, and another thing if it fails.
But I think there's a problem on the catch, because it doesn't receive a state object. Or maybe it receives a wierd one? Or wait I think I'm catching an error on the .then() handler, not the get itself?
This also doesn't work:
each($.data, get()
.catch(...)
.then(...)
)
Because it'll catch the error and THEN trigger the .then(), which isn't what we want.
Something is up here, and the docs don't show an example of a .then() AND a .catch() on the same operation. Need to investigate, fix and clarify.
Also, while I'm here, need to ensure that catch receives the last-good-state (the state before the throw), and that whatever the catch returns is the next state going forward.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status