AOSSIE-Org / AOSSIE-Org/OpenPeerChat-react-native

Bug: Registration Rate Limit (HTTP 429) Displays Generic Error Instead of Clear Feedback

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7
Forks
5
PR merge metrics
No merged PRs in 30d

Description

## 🌟 Feature Description

Improve the onboarding experience by handling HTTP 429 (Too Many Requests) responses explicitly during user registration.

When the backend rate limit is exceeded, the app should display a clear and user-friendly message instead of a generic error.

---

## 🔍 Problem Statement

The backend enforces a registration rate limit (e.g., 3 attempts per hour).

When a user exceeds this limit:

- The server correctly returns **HTTP 429 (Too Many Requests)**.
- The frontend does not explicitly handle this status code.
- A generic message is shown:
> "Registration failed. Please try again."

This creates a confusing user experience because:

- Users are not informed that they have been rate-limited.
- They may repeatedly attempt registration.
- The same generic error continues to appear.
- This can lead to frustration and onboarding drop-off.

Since registration is the first interaction with the application, unclear feedback at this stage negatively impacts user trust and retention.

---

## 🎯 Expected Outcome

When the backend returns HTTP 429:

- The app should explicitly detect the 429 status code.
- A clear message should be shown, such as:

> "Too many registration attempts. Please wait before trying again."

For other error cases:
- Display a generic registration failure message.
- Ensure the app does not crash or freeze.

This will:

- Improve onboarding transparency
- Reduce user frustration
- Enhance real-world usability
- Strengthen trust in the application

---

## 📷 Screenshots and Design Ideas

Suggested frontend handling logic:

```javascript
if (error.response && error.response.status === 429) {
Alert.alert(
"Rate Limit Reached",
"Too many registration attempts. Please wait before trying again."
);
} else {
Alert.alert(
"Error",
"Registration failed. Please try again."
);
}****

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.