Skip to content

getBy error message should include the value that was not found #549

Closed
@sregg

Description

@sregg

Describe the Feature

Currently, when a getBy (or findBy) fails, the error is only No instance found.
It would be great to have what value was not found.
e.g. getByText('text that doesn't exist') would throw No instance found with text 'text that doesn't exist'

Possible Implementations

If it's easier to implement you could even omit the type like No instance found: 'text that doesn't exist'

Related Issues

#547
Currently findBy doesn't show the stack-trace so it's hard to know which one failed.
Having a better error message would make it easier to debug, even without the stack-trace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions