curved-kangaroo-10618
04/16/2023, 4:24 PMmysterious-belgium-25713
04/16/2023, 5:29 PMjs
// dynamically destroy the request and
// respond with a network error
cy.intercept('POST', '/users', (req) => {
if (mustDestroy(req)) {
req.destroy()
}
function mustDestroy(req) {
// code that determines whether to force a network error
// based on the contents of `req`
}
})