[PR #4234] [MERGED] docs(email-otp): correct error code #30869

Closed
opened 2026-04-17 21:52:28 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4234
Author: @lewsmith
Created: 8/26/2025
Status: Merged
Merged: 8/29/2025
Merged by: @himself65

Base: canaryHead: docs/email-otp-error


📝 Commits (2)

  • 0bf76c6 docs(email-otp): correct error code from MAX_ATTEMPTS_EXCEEDED to TOO_MANY_ATTEMPTS
  • bc03761 Merge branch 'canary' into docs/email-otp-error

📊 Changes

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

View changed files

📝 docs/content/docs/plugins/email-otp.mdx (+2 -2)

📄 Description

The documentation in docs/content/docs/plugins/email-otp.mdx previously stated that the error code returned after exceeding the allowed number of OTP attempts was MAX_ATTEMPTS_EXCEEDED.

However, the actual error thrown in the implementation is TOO_MANY_ATTEMPTS, as defined here.

This commit updates the docs to reflect the correct error code and prevent confusion for users implementing custom error handling.


Summary by cubic

Corrected the email-otp docs to use the actual error code TOO_MANY_ATTEMPTS when max OTP attempts are exceeded, replacing MAX_ATTEMPTS_EXCEEDED. This aligns the docs with the implementation so custom error handling works as expected.


🔄 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/4234 **Author:** [@lewsmith](https://github.com/lewsmith) **Created:** 8/26/2025 **Status:** ✅ Merged **Merged:** 8/29/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `docs/email-otp-error` --- ### 📝 Commits (2) - [`0bf76c6`](https://github.com/better-auth/better-auth/commit/0bf76c61630944a62ee8d877f85d1024b5ebb4d0) docs(email-otp): correct error code from MAX_ATTEMPTS_EXCEEDED to TOO_MANY_ATTEMPTS - [`bc03761`](https://github.com/better-auth/better-auth/commit/bc037614a89931e0e2a43e3ab71ce47d792abd8a) Merge branch 'canary' into docs/email-otp-error ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/email-otp.mdx` (+2 -2) </details> ### 📄 Description The documentation in `docs/content/docs/plugins/email-otp.mdx` previously stated that the error code returned after exceeding the allowed number of OTP attempts was `MAX_ATTEMPTS_EXCEEDED`. However, the actual error thrown in the implementation is `TOO_MANY_ATTEMPTS`, as defined [here](https://github.com/better-auth/better-auth/blob/557dc39c32ca639a3b221d93250eb4b828120378/packages/better-auth/src/plugins/email-otp/index.ts#L104). This commit updates the docs to reflect the correct error code and prevent confusion for users implementing custom error handling. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Corrected the email-otp docs to use the actual error code `TOO_MANY_ATTEMPTS` when max OTP attempts are exceeded, replacing `MAX_ATTEMPTS_EXCEEDED`. This aligns the docs with the implementation so custom error handling works as expected. <!-- 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-17 21:52: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#30869