Catch-all Interceptor #25624
Unanswered
schmijos
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to setup a custom catch-all interceptor with
intercept
like this:I know about the existence of
blockHosts
. But I would like to guide our developers towards using stubs instead of making real requests. So just blocking with an HTTP 503 will not serve this purpose comfortably.My current solution works so-so, because
interceptor
command, so that the catch-all interceptor is removed from any matching request?cy.log
nor withCypress.log
which would allow me not tothrow
an error.req.destroy()
gives me actually a solution which is closer to the behavior I'd like because client libraries don't retry their requests. But on the other hand the requests are then not really aborted and the spinners keep spinning.assert.fail
. I think this is a bit closer to the issue at hand.Does anyone have a nice solution to those problems?
Beta Was this translation helpful? Give feedback.
All reactions