tc39 / tc39/proposal-error-code-property

Conflict with DOMException

Open
#2 29 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
38
Forks
1
PR merge metrics
No merged PRs in 30d

Description

I don't like this as DOMException has Error in its prototype chain so we'd end up shadowing this new property making it useless in a lot of web platform code.

The web platform has established a pattern whereby if the name field is not granular enough you create a subclass of DOMException for the domain in question with specific fields that make sense.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reading the proposal discussion and checking how DOMException inherits from Error; determine whether the proposed property would be shadowed in web platform code. Done requires a resolved design direction for handling granular error information.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.