Skip to content

feat: Generate API Error Documentation #2247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

tmilewski
Copy link
Member

@tmilewski tmilewski commented May 21, 2025

🔎 Previews:

Screenshot 2025-05-21 at 5 12 10 PM

What does this solve?

As-is, our API Errors documentation is very out-of-date and maintaining this information is currently done manually which is largely unmaintainable in the long-term.

ECO-646

What changed?

This PR generates API Errors pages for the Frontend and Backend APIs based on data/api-errors.json. This file is updated automatically, as-needed, on production API deployments.

Notes

  • All removed API error pages have been redirected to /errors/overview.
  • The generated pages have been removed from the watched directories.
    • /data has been added.

Checklist

  • I have clicked on "Files changed" and performed a thorough self-review
  • All existing checks pass

@tmilewski tmilewski self-assigned this May 21, 2025
@tmilewski tmilewski requested a review from a team as a code owner May 21, 2025 20:15
Copy link

Hey, here’s your docs preview: https://clerk.com/docs/pr/2247

@tmilewski tmilewski requested a review from NWylynko May 22, 2025 03:38
@@ -106,6 +111,7 @@ export async function createConfig(config: BuildConfigOptions) {
}
: null,

skipApiErrors: config.skipApiErrors ?? false,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used for tests.

@NWylynko
Copy link
Contributor

With the api-errors.json file, where is that getting generated? Is the plan to just manually copy it over and commit it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants