-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] blacklistHosts should return failed or similar #5084
Comments
There doesn't seem to be any documented conversation on why this decision was initially made: #442 (comment)
Can you explain more fully by what you mean? I kind of feel like any implementation we choose is going to go down some avenue of 'not truly representing what we want'. But I'll bring it up with engineering. |
In our case it is an external tracking script written by Adobe, it handles connection failed errors but no server errors. Most scripts are checking if the return code is not equal to 0, if so they continue. If the return code equals 0, you know the connection failed. |
Hey @CSchulz, when #687 is complete, it will allow you to end requests with a network error by doing something like this: // force all requests to `tracking.adobe.com` to end early
cy.route({ domain: 'tracking.adobe.com' }).end() So since this will make the requested behavior possible, I'm closing this issue. |
Current behavior:
The current implementation of the blacklistHosts returns a 503 service unavailable error. For some scripts this leads to unexpected errors f.e. they are crashing completely.
see
cypress/packages/server/lib/controllers/proxy.coffee
Line 115 in 84f99e6
Screenshot of Chrome ran by cypress:
![Screenshot of Chrome ran by cypress](https://user-images.githubusercontent.com/1520593/64252200-9062bc80-cf1a-11e9-8955-cb6c17b893ec.png)
Desired behavior:
The blacklistHosts implementation should return a failed or similar error like the DNS is not resolvable.
Screenshot of Chrome with failing DNS resolution:
![Screenshot of Chrome](https://user-images.githubusercontent.com/1520593/64252149-6e693a00-cf1a-11e9-8297-76c5739d4fe2.png)
Versions
3.4.1
The text was updated successfully, but these errors were encountered: