Commit Graph

5 Commits

Author SHA1 Message Date
Jiwon Choi d7aa66c345 Remove generated error codes (#97687)
### Why?

Should come up with better solution that does not block PRs with git
conflict

x-ref:
https://vercel.slack.com/archives/C02CDC2ALJH/p1785263902728189?thread_ts=1785263687.502649&cid=C02CDC2ALJH

### How?

- Delete `errors.json`, the error-code SWC plugin, generated WASM, merge
driver, and validation/build tooling.
- Stop attaching error codes to server-rendering digests, redboxes, and
telemetry; native `Error.code` and `Error.name` remain available where
applicable.
- Remove the development-overlay error feedback UI, middleware, and
telemetry event that depended on stable codes.
- Update fixtures, snapshots, and guidance for code-free errors and
numeric-only digests.

<!-- NEXT_JS_LLM -->
2026-08-21 22:45:12 +02:00
Sebastian "Sebbie" Silbermann 5f25885874 [devtools] Show AggregateError.errors in the error overlay (#91835) 2026-03-27 07:21:19 -07:00
Sebastian "Sebbie" Silbermann d1d2912ec3 [devtools] Add support for error causes in the dev overlay (#90108) 2026-02-17 23:33:11 +00:00
Sebastian "Sebbie" Silbermann ad90a67439 [test] Assert on stable error codes (#84671)
Fixes
```
DevErrorOverlay › sends feedback when clicking not helpful button

    expect(received).toEqual(expected) // deep equality

    - Expected  - 1
    + Received  + 1

      Array [
    -   "/__nextjs_error_feedback?errorCode=E794&wasHelpful=false",
    +   "/__nextjs_error_feedback?errorCode=E209&wasHelpful=false",
      ]
```

--
https://github.com/vercel/next.js/actions/runs/18360913450/job/52306369449#step:34:793
2025-10-09 00:20:13 -07:00
Jude Gao 306d4bda68 feat: error code (#73332)
This update introduces a custom `swc-plugin` for Next.js that appends a
non-enumerable `__NEXT_ERROR_CODE` property to all `Error` instances,
enabling anonymous telemetry while keeping error codes hidden from
console logs. The plugin manages error codes through an append-only
`/packages/next/errors.json` file, which is automatically updated during
the `pnpm build` process using a two-pass system to ensure consistent
error mapping, even during concurrent builds.
2024-12-11 11:30:28 -05:00