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

500 error when updating username to an already used username #83

Closed
bethanyr opened this issue Jul 11, 2018 · 1 comment
Closed

500 error when updating username to an already used username #83

bethanyr opened this issue Jul 11, 2018 · 1 comment
Labels
Category: Quality Assurance Changes to code or files that improve testing or fixes bugs. Type: Bug Bug or Bug fixes.

Comments

@bethanyr
Copy link

bethanyr commented Jul 11, 2018

Describe the bug
When I use the /PUT User api - and update a username to an already taken username, it returns a 500 Internal Server error

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'http://systers-mentorship-dev.eu-central-1.elasticbeanstalk.com/'
  2. Click on 'PUT /user' Swagger entry
  3. Enter your Bearer Token, and in the payload - include: "username": "isabel" - which is the name of an already created user
  4. See error

Expected behavior
return a more descriptive error message than: 500

{
  "message": "Internal Server Error"
}

In the register user api call - if you use an existing username - you get a 400 error with this message:

{
  "message": "A user with that username already exists"
}

That might be better than returning a 500 Internal Server Error

Screenshots
n/a

Desktop (please complete the following information):
n/a

Smartphone (please complete the following information):
n/a

Additional context
n/a

@isabelcosta isabelcosta added Category: Quality Assurance Changes to code or files that improve testing or fixes bugs. Type: Bug Bug or Bug fixes. labels Jul 11, 2018
@isabelcosta
Copy link
Member

Thank you @bethanyr for reporting this bug!
I just tested this now and it happens to me too.
I'll create an issue to solve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Quality Assurance Changes to code or files that improve testing or fixes bugs. Type: Bug Bug or Bug fixes.
Projects
None yet
Development

No branches or pull requests

2 participants