You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I confused myself over this today and it became a problem
I want to do this:
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:
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.
The text was updated successfully, but these errors were encountered: