Cypress error handling code example
Example 1: cypress custom error message
it('fails with custom message via overwrite of should', () => {
cy.wrap(1).should('eq', 1, { message: 'custom error message 1'})
cy.wrap(1).should('eq', 2, { message: 'custom error message 2'})
})
Example 2: exception handling cypress
localStorage.debug = 'cypress:*'