[PR #7714] docs: generate error codes #24410

Open
opened 2026-04-15 22:21:28 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7714
Author: @himself65
Created: 1/30/2026
Status: 🔄 Open

Base: mainHead: himself65/2026/01/30/error-mdx


📝 Commits (10+)

📊 Changes

44 files changed (+10747 additions, -3336 deletions)

View changed files

📝 .cspell/third-party.txt (+2 -0)
docs/.gitignore (+31 -0)
docs/content/docs/reference/errors/account_already_linked_to_different_user.mdx (+0 -64)
docs/content/docs/reference/errors/email_doesn't_match.mdx (+0 -34)
docs/content/docs/reference/errors/email_not_found.mdx (+0 -38)
docs/content/docs/reference/errors/index.mdx (+0 -21)
docs/content/docs/reference/errors/invalid_callback_request.mdx (+0 -47)
docs/content/docs/reference/errors/no_callback_url.mdx (+0 -22)
docs/content/docs/reference/errors/no_code.mdx (+0 -38)
docs/content/docs/reference/errors/oauth_provider_not_found.mdx (+0 -47)
docs/content/docs/reference/errors/signup_disabled.mdx (+0 -32)
docs/content/docs/reference/errors/state_mismatch.mdx (+0 -51)
docs/content/docs/reference/errors/state_not_found.mdx (+0 -61)
docs/content/docs/reference/errors/unable_to_get_user_info.mdx (+0 -31)
docs/content/docs/reference/errors/unable_to_link_account.mdx (+0 -39)
docs/content/docs/reference/errors/unknown.mdx (+0 -17)
📝 docs/package.json (+1 -0)
📝 landing/components/sidebar-content.tsx (+51 -213)
📝 packages/api-key/src/error-codes.ts (+440 -0)
📝 packages/better-auth/package.json (+1 -0)

...and 24 more files

📄 Description

Closes: https://github.com/better-auth/better-auth/issues/8264

Summary by cubic

Auto-generates error code docs from source and removes the hand-written MDX pages.

  • New Features

    • Added @better-auth/error-codes-extractor to parse defineErrorCodes JSDoc and emit MDX under docs/content/docs/reference/errors.
    • Integrated the plugin into core and better-auth builds (tsdown + turbo); updated docs/.gitignore and “Edit on GitHub” on error pages to link to source via GitHub code search.
    • Expanded JSDoc for error codes across core and plugins (descriptions, causes, fixes) to drive the generated docs.
  • Migration

    • To refresh error docs, run the core and better-auth package builds (or your workspace build).

Written for commit 0f51f61bff14844b65c89b82aabd50c9d27d4e7a. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/7714 **Author:** [@himself65](https://github.com/himself65) **Created:** 1/30/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `himself65/2026/01/30/error-mdx` --- ### 📝 Commits (10+) - [`08aae9d`](https://github.com/better-auth/better-auth/commit/08aae9df36593f6267d227acce3d6202d482f328) docs: generate error codes - [`bb1fc0a`](https://github.com/better-auth/better-auth/commit/bb1fc0a181296d3bc1adc9801880f90c6378f929) docs: generate error codes - [`98ef5f9`](https://github.com/better-auth/better-auth/commit/98ef5f982d69799e0dd5f9f2ba14499d8032d101) fix: code - [`2e7a22c`](https://github.com/better-auth/better-auth/commit/2e7a22cb4ba5a93df510dd13b85bcd7381f4f645) fix: code - [`86b7d4e`](https://github.com/better-auth/better-auth/commit/86b7d4ed0202afb0981be929d61f6d5de92789b6) fix: code - [`2b85826`](https://github.com/better-auth/better-auth/commit/2b85826dd5edb5c349e7162103e17b7af47b1b8f) fix: code - [`2dba1a9`](https://github.com/better-auth/better-auth/commit/2dba1a9e919ef38a07365eaea901a2081cc74cf9) fix: code - [`2b78aa2`](https://github.com/better-auth/better-auth/commit/2b78aa29ff1fc2c517bfcaa1c36aa09110a86703) fix: code - [`41bd9f0`](https://github.com/better-auth/better-auth/commit/41bd9f0fd1d3e65d4dc63e468f5cec4f7096c83d) fix: lint - [`dd03e19`](https://github.com/better-auth/better-auth/commit/dd03e1940e0b73175af57676f8c379b3e59b4d41) fix: naming ### 📊 Changes **44 files changed** (+10747 additions, -3336 deletions) <details> <summary>View changed files</summary> 📝 `.cspell/third-party.txt` (+2 -0) ➕ `docs/.gitignore` (+31 -0) ➖ `docs/content/docs/reference/errors/account_already_linked_to_different_user.mdx` (+0 -64) ➖ `docs/content/docs/reference/errors/email_doesn't_match.mdx` (+0 -34) ➖ `docs/content/docs/reference/errors/email_not_found.mdx` (+0 -38) ➖ `docs/content/docs/reference/errors/index.mdx` (+0 -21) ➖ `docs/content/docs/reference/errors/invalid_callback_request.mdx` (+0 -47) ➖ `docs/content/docs/reference/errors/no_callback_url.mdx` (+0 -22) ➖ `docs/content/docs/reference/errors/no_code.mdx` (+0 -38) ➖ `docs/content/docs/reference/errors/oauth_provider_not_found.mdx` (+0 -47) ➖ `docs/content/docs/reference/errors/signup_disabled.mdx` (+0 -32) ➖ `docs/content/docs/reference/errors/state_mismatch.mdx` (+0 -51) ➖ `docs/content/docs/reference/errors/state_not_found.mdx` (+0 -61) ➖ `docs/content/docs/reference/errors/unable_to_get_user_info.mdx` (+0 -31) ➖ `docs/content/docs/reference/errors/unable_to_link_account.mdx` (+0 -39) ➖ `docs/content/docs/reference/errors/unknown.mdx` (+0 -17) 📝 `docs/package.json` (+1 -0) 📝 `landing/components/sidebar-content.tsx` (+51 -213) 📝 `packages/api-key/src/error-codes.ts` (+440 -0) 📝 `packages/better-auth/package.json` (+1 -0) _...and 24 more files_ </details> ### 📄 Description Closes: https://github.com/better-auth/better-auth/issues/8264 <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Auto-generates error code docs from source and removes the hand-written MDX pages. - **New Features** - Added @better-auth/error-codes-extractor to parse defineErrorCodes JSDoc and emit MDX under docs/content/docs/reference/errors. - Integrated the plugin into core and better-auth builds (tsdown + turbo); updated docs/.gitignore and “Edit on GitHub” on error pages to link to source via GitHub code search. - Expanded JSDoc for error codes across core and plugins (descriptions, causes, fixes) to drive the generated docs. - **Migration** - To refresh error docs, run the core and better-auth package builds (or your workspace build). <sup>Written for commit 0f51f61bff14844b65c89b82aabd50c9d27d4e7a. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 22:21:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#24410