Closed kettanaito closed 6 months ago
Need to adjust some tests to reflect the Interceptors change.
The problem was that we throw an error in onUnhandledRequest
and we intend that error to be forwarded to the process but since it happens within the request listener, it gets treated as an unhandled error and translated to the 500 error response. This hurts observability as it masks the error as an error response.
I've merged https://github.com/mswjs/interceptors/pull/566 to allow us to opt-out from that default behavior and handle our internal errors differently (e.g. by forwarding them to the process).
This has been released in v2.3.0!
Make sure to always update to the latest version (npm i msw@latest
) to get the newest features and bug fixes.
Predictable release automation by @ossjs/release.
While I don't love the breaking change with a minor rev, this is a good change!
It actually allowed me to undo a bunch of special casing I introduced into my tests to handle the previously unhandled errors as I'm porting my http stubbing library from nock
to msw
.
Todo