mswjs / msw

Industry standard API mocking for JavaScript.
https://mswjs.io
MIT License
15.99k stars 522 forks source link

Unclear how to throw an actual error #2176

Closed theoephraim closed 5 months ago

theoephraim commented 5 months ago

Scope

Improves an existing behavior

Compatibility

Feature description

It seems all errors thrown in an interceptor are swallowed and turned into a request response. What if I actually just want to throw an error? I did some digging in the source and the docs but couldn't quite figure it out.

Thanks!

theoephraim commented 5 months ago

Apologies - I meant to open this on https://github.com/mswjs/interceptors