github / github/gh-aw

require-error-code-in-thrown-error: ERROR_CODE_PATTERN does not recognize error_codes.cjs non-ERR_/E0xx exports

Open
#61,285 0 comments 0 reactions 0 assignees View on GitHub
cookie eslint eslint-factory
Dominant language
Go
Stars
5.1k
Forks
541
Avg merge
5h 48m
Merged PRs (30d)
773

Description

### Rule: `require-error-code-in-thrown-error`

`ERROR_CODE_PATTERN` (eslint-factory/src/rules/require-error-code-in-thrown-error.ts:6) is:

```js
const ERROR_CODE_PATTERN = /(?

> [!WARNING]
>
> Firewall blocked 1 domain
>
> The following domain was blocked by the firewall during workflow execution:
>
> - `api.anthropic.com`
>
> To allow these domains, add them to the `network.allowed` list in your workflow frontmatter:
>
> ```yaml
> network:
> allowed:
> - defaults
> - "api.anthropic.com"
> ```
>
> See [Network Configuration](https://github.github.com/gh-aw/reference/network/) for more information.
>
>

> Generated by [🤖 ESLint Refiner](https://github.com/github/gh-aw/actions/runs/35059244673) · claude · agent · 318.3 AIC · ⌖ 7.46 AIC · ⊞ 5.8K · [◷](https://github.com/search?q=repo%3Agithub%2Fgh-aw+is%3Aissue+%22gh-aw-workflow-call-id%3A+github%2Fgh-aw%2Feslint-refiner%22&type=issues)
> - [x] expires on Sep 22, 2026, 9:36 PM UTC-08:00

Contributor guide

Open the contributing guide

Research direction

Start with eslint-factory/src/rules/require-error-code-in-thrown-error.ts and its rule tests, then compare ERROR_CODE_PATTERN with the exports listed in actions/setup/js/error_codes.cjs:61-72,87-89. Decide whether those exports belong to the rule's valid-code vocabulary or should be explicitly excluded, add coverage for RATE_LIMIT_EXCEEDED in a thrown error, and ensure the documentation or matching logic reflects that decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, javascript, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.