import { XMLHttpRequestInterceptor } from '@mswjs/interceptors/XMLHttpRequest';
const interceptor = new XMLHttpRequestInterceptor()
// Enable the interception of requests.
interceptor.apply()
// Listen to any "http.ClientRequest" being dispatched,
// and log its method and full URL.
interceptor.on('request', ({ request, requestId }) => {
console.log(request.method, request.url)
})
plugin:sample-plugin:3177 Uncaught TypeError: Illegal invocation
at next (plugin:sample-plugin:3177:28)
at Proxy.setProperty (plugin:sample-plugin:3256:20)
at handler.set (plugin:sample-plugin:3188:26)
at window.ajax (enhance.js:1:11991)
at e.logout (app.js:1:264780)
at app.js:1:2424502
at HTMLButtonElement.<anonymous> (app.js:1:1324908)
Caught here: