Emulate Network Errors in MSW

Share this video with your friends

Send Tweet

Accounting for network errors is what makes a good application great. Unlike error responses, network errors represent issues when sending a request or receiving a response, but all the same can be mocked with standard JavaScript API.

In this lesson, you will learn about Response.error() and how to use it to emulate network errors in your Mock Service Worker handlers.