[PR #3213] [MERGED] fix(api-key): improve error statuses #12951

Closed
opened 2026-04-13 08:40:39 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3213
Author: @ping-maxwell
Created: 6/29/2025
Status: Merged
Merged: 6/29/2025
Merged by: @Bekacru

Base: mainHead: fix/api-key/error-statuses


📝 Commits (4)

📊 Changes

2 files changed (+3 additions, -4 deletions)

View changed files

📝 packages/better-auth/src/plugins/api-key/api-key.test.ts (+1 -1)
📝 packages/better-auth/src/plugins/api-key/routes/verify-api-key.ts (+2 -3)

📄 Description

When an API key is rate-limited, the status should be TOO_MANY_REQUESTS not UNAUTHORIZED


🔄 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/3213 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 6/29/2025 **Status:** ✅ Merged **Merged:** 6/29/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/api-key/error-statuses` --- ### 📝 Commits (4) - [`077f872`](https://github.com/better-auth/better-auth/commit/077f872eadcad058c36f6c7147a9a0dabadbfc22) fix(api-key): improve error statuses - [`cc38ff7`](https://github.com/better-auth/better-auth/commit/cc38ff7050bd51a38a90ff19d268e04cb2d6ffd1) Update packages/better-auth/src/plugins/api-key/routes/verify-api-key.ts - [`f5abfd2`](https://github.com/better-auth/better-auth/commit/f5abfd249d180fe64cdb0c2dffbc28ac2b3cf5db) fix: tests - [`a02dddc`](https://github.com/better-auth/better-auth/commit/a02dddcbd888edd5c57bdd33cd3316c5a8fc499d) Merge branch 'fix/api-key/error-statuses' of https://github.com/ping-maxwell/better-auth into fix/api-key/error-statuses ### 📊 Changes **2 files changed** (+3 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/api-key/api-key.test.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/api-key/routes/verify-api-key.ts` (+2 -3) </details> ### 📄 Description When an API key is rate-limited, the status should be `TOO_MANY_REQUESTS` not `UNAUTHORIZED` --- <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-13 08:40:39 -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#12951