I am still quite new to this and perhaps promise.all()
is not what I need, or maybe I am just doing this the wrong way to begin with, but I have a bunch of resources I am trying to fetch via HTTP.
Some of them will not be available to certain account types, so I figure, let the ones that fail due to server-side permission fail and just get on with it.
promise.all([
http.get('bookings'),
http.get('users'),
http.get('listings')
])
.then(valuse => assign(values))
.catch(err => makeAnError(err))
So assuming http.get('users')
fails, the promise.all will reject and none of the other values will be assigned as the resolve function to assign those values never runs.
What are some suggested solutions to this?