Problem Statement
Which block is used with async / await to handle request errors?
Explanation
Errors in async functions are caught using try / catch blocks.
This ensures that failed API calls or JSON parsing errors don’t crash the app and can be handled gracefully.
Code Solution
SolutionRead Only
try { const res = await fetch(url); } catch(e) { console.error(e); }