Skip to content

Cypress prints (uncaught exception) undefined: undefined when promise rejects with a string #24915

@geritol

Description

@geritol

Current behavior

When the app code rejects with a string:

  • developer console displays the error properly
  • cypress displays (uncaught exception) undefined: undefined and fails the test

Desired behavior

  • cypress displays the exact error cause (reject's string content) and fails the test

Test code to reproduce

https://github.com/geritol/cypress-bug-repro

Cypress Version

11.2.0

Node version

v16.18.1

Operating System

macOS 12.6

Debug Logs

No response

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions