You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the application makes request, it obviously fails and I have a handler in the code that deals with that.
For some reason, Cypress runner sees a problem and throws the following error:
TypeError: The following error originated from your application code, not from Cypress.
> Cannot read property '__error' of null
When Cypress detects uncaught errors originating from your application it will automatically fail the current test.
This behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.
at XMLHttpRequest._getFixtureError (http://localhost:3000/__cypress/runner/cypress_runner.js:163165:22)
at onLoadFn (http://localhost:3000/__cypress/runner/cypress_runner.js:162015:27)
at XMLHttpRequest.<anonymous> (http://localhost:3000/__cypress/runner/cypress_runner.js:161999:25)
From previous event:
That line, maps to the following code in cypress_runner.js:
{key: "_getFixtureError",value: function_getFixtureError(){varbody=this.response&&this.response.body;varerr=body.__error;// this causes issue as body is null !if(body&&err){returnerr;}}}
Looks like that code should perhaps check if the response.body is null first before trying to access __error?
The net result is that my test is marked as failed, which is incorrect.
Desired behavior:
When I preconfigure a route to return an error, cypress handles it without failing the test.
Versions
Cypress: 3.7.0
OS: Windows/Linux
The text was updated successfully, but these errors were encountered:
Current behavior:
I have a route configured in the following way:
When the application makes request, it obviously fails and I have a handler in the code that deals with that.
For some reason, Cypress runner sees a problem and throws the following error:
That line, maps to the following code in cypress_runner.js:
Looks like that code should perhaps check if the response.body is null first before trying to access __error?
The net result is that my test is marked as failed, which is incorrect.
Desired behavior:
When I preconfigure a route to return an error, cypress handles it without failing the test.
Versions
Cypress: 3.7.0
OS: Windows/Linux
The text was updated successfully, but these errors were encountered: