In a controller I have multiple calls to some methods that return a promise.
I'm going to use the await/async statement and I have something like this:
try {
let foo = await myFirstMethod();
let bar = await mySecondMethod();
}catch(e => {
// which method fails between the both?
});
Yes, I know that I could split the call in two separate try/catch statement, but I have to handle also this scenario and in addiction I'd like to understand which is the better way to have a specific type of error response for each methods.
Any helps or suggestions are appreciated and welcome.
Thanks