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

Create User: Return correct status code #44

Open
klaerch opened this issue Jan 8, 2021 · 1 comment
Open

Create User: Return correct status code #44

klaerch opened this issue Jan 8, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@klaerch
Copy link

klaerch commented Jan 8, 2021

When trying to add a user that already exists the API currently returns the status "bad request". But actually the request is correct, only the response should contain the information, that the user already existed AND return the ID of that user.

Use case: I am using Zapier to add new users. There are several steps in the process:

  1. request "add user"
  2. request "add that user to space xy"

But Zapier receives "error 400" on the first requests and stops, because it thinks the request was malformed.

@luke-
Copy link
Contributor

luke- commented Jan 8, 2021

I would suggest if there is already a user with the email address or username, we can return an HTTP Error 409 Conflict. Possibly with an output of "Conflicted with user details".

Otherwise I guess you have to do getUserByEmail/Id/Username first and check if the user already exists.

Would this be possible with your Zapier environment?

@luke- luke- added the enhancement New feature or request label Jan 8, 2021
@luke- luke- changed the title Return correct status code Create User: Return correct status code Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants