AOSSIE-Org / AOSSIE-Org/DebateAI

[BUG]: Authentication errors are not displayed correctly due to inconsistent response fields

オープン 初心者向け
#470 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
TypeScript
スター
84
フォーク
198
平均マージ
2日 19時間
マージ済み PR(30日)
30

説明

### Bug Description

Several backend authentication failure responses return the error text using the error field:
{
"error": "Invalid email or password"
}
However, the frontend login function only reads data.message:
if (!response.ok) {
throw new Error(data.message || "Login failed");
}

As a result, users see the generic “Login failed” message instead of the specific backend error, such as:
- Invalid email or password
- Email not verified
- Invalid input
Error response handling should be consistent across authentication functions.

### Steps to Reproduce

Steps to Reproduce
1. Open the authentication page.
2. Enter an incorrect email or password.
3. Click Sign In With Email.
4. Observe the displayed error message.
5. The frontend shows “Login failed” instead of “Invalid email or password”.
6. The same problem occurs when attempting to log in with an unverified email.

### Logs and Screenshots

Image

### Environment Details

- OS: Windows 11
- Frontend: React, TypeScript and Vite
- Backend: Go and Gin
- Browser: Chrome
- Deployment: Local/Docker

### Impact

Medium - Feature works but has issues

### Code of Conduct

- [x] I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and will post updates there
- [x] I have searched existing issues to avoid duplicates

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start at the frontend login function shown in the issue and trace the authentication functions that handle failed responses, then compare them with the backend authentication responses returning error. Verify the behavior with incorrect credentials and an unverified email; done means specific backend error text is displayed instead of the generic fallback.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
go, react, typescript, vite
領域
api, authentication, backend, frontend
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
72/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。