Testing 400s but Cypress fails my test and how to avoid listening to Uncaught Exception #24944
Unanswered
pemaldonadot
asked this question in
Questions and Help
Replies: 1 comment
-
In my experience errors originating for the application code is what the dev team should address otherwise we'd have to use |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hey friends! I have a test case within my e2e suite where I'm landing on a checkout page and inserting wrong card information so I validate that payment is not being processed.
After clicking on submit, I'm cy.intercepting 2 of our API calls that return 400, however cypress is telling me that there was an error coming from the application with the message "The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection. > Request failed with status code 400". I'm testing specifically that!! and I wouldn't like to use Uncaught Exception off cause that would lead us to not see other issues within the application.
How can I handle this? Could anyone help me out here?
Beta Was this translation helpful? Give feedback.
All reactions