Hi,
While testing my app with some edge cases, I stumbled on some weird behaviors regarding user registration.
I first register my users anonymously (guest users). Then they can create an account, in which case I use the Register User
block (in Codeless), and send their email, password, along with the objectId
of the guest user.
If the user tries to register with an existing email address, it produces an error, as is to be expected. However, the first time this is done, the HTTP error code is 400, and the error says Duplicate value 'abc@def.com' for column 'email'
, whereas all attempts thereafter come back with a 409 code, and an error message Unable to register user with identity 'abc@def.com'. User already exists.
I was quite puzzled that the error code changes.
The strangest thing, though, is that even though the first transaction fails, the user status is changed from GUEST
to ENABLED
, even though the email address is not set. This means that I end up having registered users with incorrect email address identities. Plus, this hinders any subsequent attempt at registering.
I suspect the first issue has to do with the second. Is this a known or reported issue ? Could you advise as to how I could solve it ?
Thanks