[PR #4288] [MERGED] feat: check endpoint conflits #5292

Closed
opened 2026-03-13 12:17:13 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4288
Author: @himself65
Created: 8/28/2025
Status: Merged
Merged: 9/2/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/08/27/check


📝 Commits (5)

📊 Changes

4 files changed (+373 additions, -1 deletions)

View changed files

packages/better-auth/src/api/check-endpoint-conflicts.test.ts (+290 -0)
📝 packages/better-auth/src/api/index.ts (+58 -1)
📝 packages/better-auth/src/init.ts (+2 -0)
packages/better-auth/src/test/utils.ts (+23 -0)

📄 Description

Upstream: https://github.com/better-auth/better-auth/pull/4278
Related: https://github.com/better-auth/better-auth/issues/3595

Summary by cubic

Add endpoint conflict detection for plugin-defined API paths, run during init. It logs a clear error with the conflicting paths and plugin IDs to help prevent routing collisions without breaking startup.

  • New Features
    • Added checkEndpointConflicts to scan plugin endpoints and detect duplicate paths.
    • Invoked during init; logs an error with paths and plugin IDs plus guidance to resolve.
    • Non-blocking: no exception thrown; startup continues.

🔄 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/4288 **Author:** [@himself65](https://github.com/himself65) **Created:** 8/28/2025 **Status:** ✅ Merged **Merged:** 9/2/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/08/27/check` --- ### 📝 Commits (5) - [`01e321c`](https://github.com/better-auth/better-auth/commit/01e321c977e55eb0756968bbcd6db88731cc3795) feat: detect endpoints conflicts - [`9612b7c`](https://github.com/better-auth/better-auth/commit/9612b7c9f7f02a835142ad8043e571a8844c09c6) fix: rename - [`f4fbd37`](https://github.com/better-auth/better-auth/commit/f4fbd370d97eacb73a323b0039aa55471b69b7d5) fix: comment - [`d6444b3`](https://github.com/better-auth/better-auth/commit/d6444b38383599cd0f53ff52710d13f37d032af2) fix: code - [`9f83d3c`](https://github.com/better-auth/better-auth/commit/9f83d3c45dea7ac3d40665d5db5c278c10960c6b) fix: test utils ### 📊 Changes **4 files changed** (+373 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `packages/better-auth/src/api/check-endpoint-conflicts.test.ts` (+290 -0) 📝 `packages/better-auth/src/api/index.ts` (+58 -1) 📝 `packages/better-auth/src/init.ts` (+2 -0) ➕ `packages/better-auth/src/test/utils.ts` (+23 -0) </details> ### 📄 Description Upstream: https://github.com/better-auth/better-auth/pull/4278 Related: https://github.com/better-auth/better-auth/issues/3595 <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Add endpoint conflict detection for plugin-defined API paths, run during init. It logs a clear error with the conflicting paths and plugin IDs to help prevent routing collisions without breaking startup. - **New Features** - Added checkEndpointConflicts to scan plugin endpoints and detect duplicate paths. - Invoked during init; logs an error with paths and plugin IDs plus guidance to resolve. - Non-blocking: no exception thrown; startup continues. <!-- 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-03-13 12:17:13 -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#5292