Linked Questions
34 questions linked to/from Handling errors in Promise.all
2 votes
1 answer
1k views
Promise.all vs await Promise.all example wrong
I'm trying to see myself the different between Promise.all and await Promise.all. I have learnt that the first one ends earlier if one of the promises fail but in the same case with await we have to ...
-2 votes
3 answers
3k views
how to break a for loop inside try catch
I have the following code try { for (const customer of customers) { followUser(ig, customer.trim()); } } catch (err){ console.log('ERROR: ' + " " + err); } followUser is ...
4 votes
2 answers
1k views
If promise fails, catch but do the next [duplicate]
I currently have this code: const promise1 = aPromiseCall().then(r => logger(r)).catch(e => logger(e)); const promise2 = anotherPromiseCall().then(r => logger(r)).catch(e => logger(e)); ...
1 vote
1 answer
1k views
Asynchronous filtering an array of Promises
I have an array of strings let symbols = ['abc', 'cde', 'edf', 'qqe', 'hrt'] that I pass as an argument to the function: async function fetchDetails(symbols) { let promises = symbols.map((s, i) =&...
2 votes
2 answers
714 views
Nested Axios Call Only Returns First Value to Array
I am nesting an Axios call in another in order to get the list of IDs from my first call and then loop through and for each ID get the status from a 2nd API call. It will only return the first status ...
0 votes
1 answer
572 views
Angular 2 - multiple HTTP POST request : handle error from each request
I am looking for a way where in i can post multiple HTTP POST requests and just in case there is error on one or more of them then i can know which of those got the error. I tried implementing many ...
0 votes
0 answers
719 views
Axios instance promise.all error handling
I have the following code in my own async function that uses another imported function from module which is a custom wrap of axios inside try/catch block: async function getCharacter (realmSlug, ...
0 votes
2 answers
795 views
Promise.all to resolve all the promise even if some failed to update the redux store [duplicate]
I am using API call to get data and update my redux store. Following is state changes for each API call. Before making API call, set isLoading as true On success reset isLoading as false On failure ...
1 vote
1 answer
564 views
Javascript and async problem (building distance matrix with yandex maps api)
I'm new to js and async/await stuff and I want to build distance matrix using yandex maps api and then optimize the route using ACO algorithm. Everything works, but my distance matrix generating so ...
3 votes
2 answers
136 views
promise.all not access in rejection function
i have one service that get data , and i called it 5 times with different parametes to get different data. I called a function to execute in success case : it work fine. but in case of failure one ...
1 vote
2 answers
221 views
what is the canonical way to prevent Promise.all from rejecting on first error?
I have the following code await doAllCats(); await doAllDogs(); console.log("Finished processing Cats and Dogs ") function doAllCats() { let promiseArray = []; for(let cat of cats) { ...
1 vote
2 answers
119 views
Better way to Handle multiple similar API calls
I am trying to make a front-end website using react, and I am using the APIs that NASA has. My main question pertains to the 4 Mars Rovers: Curiosity, Opportunity, Spirit, and Mission Manifest. Each ...
0 votes
1 answer
93 views
How to ensure that all operations in a cloud function have been successfully completed?
I am using Firebase Cloud Functions, which get triggered by the creation of a document in Firestore. On creation of the object, I need to undertake two different operations in parallel: update the ...
1 vote
2 answers
92 views
Why is not this promise catch fired in my promises array
I learn React JavaScript and have this Codesandbox where I don't understand why the error is not shown Here in the watchProgress the catch is not fired but it's fired in the promise so I do something ...
1 vote
5 answers
106 views
Detecting end of a loop inside async code that's inside of another function inside this loop
So I have this code: for (let i = 0; i < array.length; i++) { let url = array[i]; YTDL.getInfo(url, function(err, info) { if (err) { message.channel.send("There was an ...