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

HTTP StatusCode 500 when a player tries to apply for a clan he's already a member #6

Closed
traysh opened this issue May 19, 2017 · 2 comments
Assignees

Comments

@traysh
Copy link
Contributor

traysh commented May 19, 2017

Wrong HTTP status code but right response body

Request:

url: http://localhost:5050/clans/11111111111111111111111111111113/memberships/application
payload: {
  "level": "member",
  "user_id": "11111111111111111111111111111113",
  "message": "oi, deixa eu entrar?"
}

Response:

statusCode: 500
body: {
  "success": false,
  "reason": "Player 11111111111111111111111111111113 already has a valid membership in clan 11111111111111111111111111111113."
}
@cscatolini
Copy link
Contributor

@traysh This is a know issue in Khan, we basically respond with 500 when anything goes wrong. I'll leave your issue here as a reminder to fix this, but I don't see this being fixed anytime soon.

@traysh traysh changed the title HTTP StatusCode 500 when a player tries to apply for clan he's already a member HTTP StatusCode 500 when a player tries to apply for a clan he's already a member May 19, 2017
@yuriabrito yuriabrito self-assigned this Dec 26, 2017
@yuriabrito
Copy link
Contributor

Returning 409 when player is already a member, and 400 when player doesn't exist (instead of 500)

#17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants