Issue with uncaught:exception Handling in Cypress 13.12.0 #29797
Unanswered
pranit-lqc
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
-
Before upgrading to Cypress 13.12.0, I was using version 13.5.1. In version 13.5.1, when an uncaught:exception occurred due to an API response, the error object provided detailed information such as the error message and error status code. This information was crucial for deciding whether to return true or false from the exception handler.
Problem:
After upgrading to Cypress 13.12.0, the error object received in the uncaught:exception handler has significantly less detail. Instead of the comprehensive information previously available, it now displays a message like the following:
`**_The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.
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._**`Impact:
This lack of detail in the error object makes it challenging to make informed decisions in the uncaught:exception handler. Specifically, the absence of the error message and status code limits our ability to handle different types of exceptions appropriately.
Request:
I would like to understand if there is a new configuration or a different approach in Cypress 13.12.0 that allows us to access the detailed error information available in version 13.5.1. Any guidance on retrieving this information in the latest version would be highly appreciated.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions