I am using Electron net request module to send requests. Sometimes requests might fail for various reasons and they pop an error in the app. For this reason i used uncaughtException handler to catch them. I need somehow to do try{}catch() on top of this request handle and to be able to catch the request because this request is being executed in an async function and i cant afford it to become a zombie or just stop working. I need to know when some async function stops working because of this and which one it is. How can i possibly catch this error because try catching this request doesnt work?
I simply send the request inside
async function someFunction(){
.
.
.
var getResult = await sendRequest()... //need to catch it here
.
.
}