RealDevSquad / RealDevSquad/website-backend
No error message returning for PATCH `users/self` route if username is already existing
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 74
- Forks
- 276
- Avg merge
- 1d 26m
- Merged PRs (30d)
- 14
Description
Currently our PATCH /users/self route is not returning any error specific to the case where the username is already existing.
We need to return an error for this case.
API-contract for the same: https://github.com/Real-Dev-Squad/website-api-contracts/tree/main/users#patch-usersself

Contributor guide
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.
Research direction
Start at the PATCH /users/self route and compare its duplicate-username behavior with the linked API contract. Trace how username conflicts are handled and check the project's existing API error conventions. Done means an already-used username produces the contract-specified error response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100