Open
Description
Current behavior
The call stack displayed in the app is incorrect when displaying an error that was thrown by the function throwByErr
and the error occurs right after a call to then
.
Desired behavior
The call stack should match the code that caused the problem.
Test code to reproduce
There are a few examples:
cy.window().then((win) => {
expect(1).to.equal(1)
})
cy.get('div').click()

cy.request('https://jsonplaceholder.cypress.io/comments').then((response) => {
expect(response.status).to.eq(200)
})
cy.task()
cy.request().then((response) => {
expect(response.status).to.eq(200)
})

Cypress Version
At least since version 10
Node version
any
Operating System
any
Debug Logs
Other
No response