I am relatively new to this and I'm thinking that maybe promise.all()
isn't the right approach for what I'm trying to achieve. I have a set of resources I need to fetch using HTTP.
Some of these resources may not be available to certain account types, so I was thinking, let the ones that fail due to server-side permission simply fail and move on from there.
promise.all([
http.get('bookings'),
http.get('users'),
http.get('listings')
])
.then(valuse => assign(values))
.catch(err => makeAnError(err))
For example, if http.get('users')
fails, the entire promise.all will reject and none of the other values will be assigned since the resolve function never gets executed.
What are some recommendations for addressing this issue?