Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Error Handling for Duplicate User Registration #39

Open
tristenwallace opened this issue May 16, 2024 · 0 comments
Open

Improve Error Handling for Duplicate User Registration #39

tristenwallace opened this issue May 16, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@tristenwallace
Copy link
Owner

Description:

Currently, when a user attempts to register with a username that is already taken, the server returns a 500 Internal Server Error. This is not informative and does not help the user understand what went wrong. We need to implement better error handling for this case to provide a more user-friendly error message.

Steps to Reproduce:

  1. Attempt to register a new user with a username that is already taken (i.e. tristenwallace).
  2. Observe that the server returns a 500 error.

Expected Behavior:

The server should return a 409 Conflict status code with a descriptive error message indicating that the username is already taken.

Actual Behavior:

The server returns a 500 Internal Server Error.

Possible Solution:

  • Update the register function in the server controller to catch duplicate username errors and return a 409 Conflict status code with a descriptive error message.
  • Update the frontend API error handling to display a user-friendly message when a 409 Conflict status code is received.
  • Add backend route for Checking Username Availability
  • Add frontend validation for Username Availability
@tristenwallace tristenwallace added bug Something isn't working enhancement New feature or request labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant