Skip to content

Design a mechanism to define Go errors that properly translate to JS errors #5557

@joanlopez

Description

@joanlopez

Feature Description

As discussed in #5461 (comment), currently we have no way to define Go errors that properly translate to JS errors (e.g. TypeError), and the mechanisms that exist nowaday, like runtime.NewTypeError(...) are Go-compliant errors (satisfy error interface).

There's this draft proposal written by @oleiade which might be a very good starting point.

Suggested Solution (optional)

No response

Already existing or connected issues / PRs (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions