Posts

JavaScript Refresher and Detailed Study - Part 10

Last updated on 21 Oct 2026 Post series: Part 1 ,     Prev Part (9) ,     Post Series TOC Contents .catch().then() chaining pattern for error recovery when using raw Promises Error thrown inside a setTimeout callback executes in different call stack from main app call stack; In browser env, even if not caught, this error does not crash app 1 - Parallel fetch and response.json operations using Promise.all - limited error handling 2 - Parallel fetch and response.json operations using Promise.allSettled - decent error handling 3 - Parallel fetch and response.json operations using Promise.allSettled - improved error handling 4 - Parallel fetch and response.json operations using Promise.allSettled and async/await with improved error handling Comparison of await response.json() with response.json().then() Promise.any() and Promise.race(): Examples of usage in typical modern JS apps as timeout enforcer and redundancy fallback respe...