3 ms·
Another upside of the proposal is that if you need to reuse the fetch promise somewhere else it will retain the reject status if the promise fails. The proposal
by runarberg 9y ago
Another upside of the proposal is that if you need to reuse the fetch promise somewhere else it will retain the reject status if the promise fails. The proposal is more akin to:
fetch(...)
.then(response => {
closeThatLoader();
return success(response);
})
.catch(error => {
closeThatLoader();
throw error;
});