I am attempting to capture errors if any of the asynchronous code within my map function fails. It seems to enter the error block but does not log anything, as the error variable remains null. Is there an alternative method for handling errors within maps?
await dataService.serviceCall()
.map(
async (data: any) => {
// Do Some Async Stuff
}, error => {
console.log(error);
}
).take(1).toPromise()