RealDevSquad / RealDevSquad/website-backend

No error message returning for PATCH `users/self` route if username is already existing

Open
#122 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue
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

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.