need help with error handling in async functions in js
So i fetch some details from backend and get in frontend..so if i turn off my internet it shows error as "cannot read properties undefined" , so i add as if(!res) throw error and provide catch block in frontend but it shows error instead it catch and store on error variable
heres the code:
react code
express.js
0 Replies