Difficulty: 5/10try/catch, promise rejection, error propagationYou can use a try/catch block around an await statement to catch errors that occur within the awaited Promise.javascriptCopyScenario Questions0-2 years experience1You need to fetch user data with fetch and async/await. How would you catch a network error and return a default object?2If an async function throws inside a try block, what does the caller receive if you don't use try/catch?2-5 years experience1We have a function that calls two async services sequentially. It sometimes fails on the second call, leaving the first call's side effects persisted. How would you restructure error handling to ensure consistency?Follow-up QuestionsCan you walk me through how the error propagates back to the caller in your example?What are the trade‑offs between handling errors locally with try/catch versus a global error handler?How would you test that your error handling behaves correctly under network failures?Suggest Improvement