[PR #2255] [MERGED] fix(haveIBeenPwned): Meaningful error code #12477

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2255
Author: @JE4GLE
Created: 4/13/2025
Status: Merged
Merged: 4/13/2025
Merged by: @Bekacru

Base: mainHead: main


📝 Commits (4)

📊 Changes

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

View changed files

📝 packages/better-auth/src/plugins/haveibeenpwned/haveibeenpwned.test.ts (+1 -3)
📝 packages/better-auth/src/plugins/haveibeenpwned/index.ts (+3 -5)

📄 Description

In my humble opinion, THE_PASSWORD_YOU_ENTERED_HAS_BEEN_COMPROMISED_PLEASE_CHOOSE_A_DIFFERENT_PASSWORD is not a valid error code.

Error codes should be short and are not required the be understand by an end user.

This MR changes the error code to PASSWORD_COMPROMISED.


🔄 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/2255 **Author:** [@JE4GLE](https://github.com/JE4GLE) **Created:** 4/13/2025 **Status:** ✅ Merged **Merged:** 4/13/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (4) - [`5ff9dee`](https://github.com/better-auth/better-auth/commit/5ff9deeb386da40f0f3e848b9c2eb6e305e18693) Updated error code - [`3e36b19`](https://github.com/better-auth/better-auth/commit/3e36b19852b483086ccf9a4bdd2c50c81a311b1c) Update haveibeenpwned.test.ts - [`e191cb1`](https://github.com/better-auth/better-auth/commit/e191cb13579a6976d99e26d4547d0fcd764defe4) fix error code - [`e8e43e4`](https://github.com/better-auth/better-auth/commit/e8e43e4b9102ac232b62a0b12c3e97f8af106dd7) fix: wrong error code usage ### 📊 Changes **2 files changed** (+4 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/haveibeenpwned/haveibeenpwned.test.ts` (+1 -3) 📝 `packages/better-auth/src/plugins/haveibeenpwned/index.ts` (+3 -5) </details> ### 📄 Description In my humble opinion, `THE_PASSWORD_YOU_ENTERED_HAS_BEEN_COMPROMISED_PLEASE_CHOOSE_A_DIFFERENT_PASSWORD` is **not** a valid error code. Error codes should be short and are not required the be understand by an end user. This MR changes the error code to `PASSWORD_COMPROMISED`. --- <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:24:30 -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#12477