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

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

Aperta
#7 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
7
Fork
5
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## 🌟 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."
);
}****

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.