Skip to content

Should we rewrite/canonicalize WebDriver errors? #50076

Open
@gsnedders

Description

@gsnedders

See https://github.com/web-platform-tests/wpt/pull/48866/files#r1821477471

We currently canonicalize an empty message string to None, an empty stacktrace string to None, and an empty data object to None.

As @whimboo reasonably pointed out in the above review thread,

I think we shouldn’t modify the returned value if it’s an empty list (or any similar value that evaluates to None). Doing so would alter the data we actually want to test and could lead to discrepancies with the spec—or could let issues slip by unnoticed, such as when a client returns an incorrect type.

We should maybe revisit this.

The stacktrace case goes back to when the code was originally written in 48edfb1 (no justification given for this behaviour), the message case goes back to 3b83423 when I changed it to make the if message is None check actually work, and the data case goes back to when #48866 lands, matching the other two.

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