[PR #5315] [CLOSED] fix(docs): add default values to ogSchema to prevent ZodError during prerendering #22821

Closed
opened 2026-04-15 21:18:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5315
Author: @ibxbit
Created: 10/15/2025
Status: Closed

Base: canaryHead: fix/docs-og-defaults


📝 Commits (7)

  • f0e78d0 docs: Fix typo in localohst to localhost in .env.example
  • 4266833 Merge branch 'canary' into canary
  • d202fda fix(docs): add default values to ogSchema to prevent ZodError during prerendering
  • ae70505 Merge branch 'canary' of https://github.com/better-auth/better-auth into canary
  • f690b19 Merge branch 'canary' into fix/docs-og-defaults
  • 04f932f chore(docs): format og/route.tsx to pass CI
  • ceefb88 fix(docs): preserve lowercase default for ogSchema type field

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 docs/app/api/og/route.tsx (+3 -3)

📄 Description

Added default values to ogSchema in api/og/route.tsx to handle undefined query params during prerendering, resolving the TypeError: Invalid URL issue. This improves build reliability for the docs package.


Summary by cubic

Prevented docs prerendering errors by adding default values to the OG image route schema and fixing a .env URL typo. This stabilizes the docs build and avoids failures when query params are missing.

  • Bug Fixes
    • Added defaults to ogSchema (heading, mode, type) in docs/app/api/og/route.tsx.
    • Corrected BETTER_AUTH_URL typo in demo/expo-example/.env.example.

🔄 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/5315 **Author:** [@ibxbit](https://github.com/ibxbit) **Created:** 10/15/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/docs-og-defaults` --- ### 📝 Commits (7) - [`f0e78d0`](https://github.com/better-auth/better-auth/commit/f0e78d08d95b96cd89be40b750298ecef58dbaab) docs: Fix typo in localohst to localhost in .env.example - [`4266833`](https://github.com/better-auth/better-auth/commit/426683390811ae3f47b5235b483e5ae9b3dbb19e) Merge branch 'canary' into canary - [`d202fda`](https://github.com/better-auth/better-auth/commit/d202fda9bc05808dca32727812b161f0b59de522) fix(docs): add default values to ogSchema to prevent ZodError during prerendering - [`ae70505`](https://github.com/better-auth/better-auth/commit/ae705058f9ac305d8673d6302b19dcc0b874c125) Merge branch 'canary' of https://github.com/better-auth/better-auth into canary - [`f690b19`](https://github.com/better-auth/better-auth/commit/f690b1955dfcc028e86f072652316b9f86dbd74d) Merge branch 'canary' into fix/docs-og-defaults - [`04f932f`](https://github.com/better-auth/better-auth/commit/04f932fba182ec8e3c2a65b6084b466dbed07034) chore(docs): format og/route.tsx to pass CI - [`ceefb88`](https://github.com/better-auth/better-auth/commit/ceefb889af21d151f71c67a7ca8ae25f9e9b7431) fix(docs): preserve lowercase default for ogSchema type field ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/app/api/og/route.tsx` (+3 -3) </details> ### 📄 Description Added default values to ogSchema in api/og/route.tsx to handle undefined query params during prerendering, resolving the TypeError: Invalid URL issue. This improves build reliability for the docs package. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Prevented docs prerendering errors by adding default values to the OG image route schema and fixing a .env URL typo. This stabilizes the docs build and avoids failures when query params are missing. - **Bug Fixes** - Added defaults to ogSchema (heading, mode, type) in docs/app/api/og/route.tsx. - Corrected BETTER_AUTH_URL typo in demo/expo-example/.env.example. <!-- 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 21:18:16 -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#22821