Course lesson

Emulate Network Errors in MSW

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.

Duration
1 min
Access
Included
Transcript
Retained from source evidence

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.