bug: CreateUser returns 409 Conflict for any database error, not just unique violations
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Read handlers/user_handler.go:58–60 and inspect the error returned by users.Create. Done means UNIQUE constraint violations retain the 409 response and “username already taken” message, while transient database errors, other constraint failures, and other errors return 500.
Written by the indexing model from the issue text.
Description
Description
handlers/user_handler.go maps every error from users.Create to HTTP 409 with the message "username already taken". A transient DB error, constraint issue on another column, or any other failure produces a misleading response.
Location
handlers/user_handler.go:58–60
Fix
Inspect the error string for a UNIQUE constraint violation (e.g. strings.Contains(err.Error(), "UNIQUE")) and return 500 for everything else.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from deannos/notifyQ
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100