I’m logging in users through Email/Password authentication. I’m reading error codes to handle specific situations, like (1) when email confirmation is required after creating an account and (2) when user tries to create an account with an existing email address.
Previously:
- (1) “confirmation needed” would return error code
47
- (2) “email already in use” would return
49
.
After updating to a more recent version of realm-core and realm-cocoa:
- (1) “confirmation needed” now returns error code
24
- (2) “email already in use” now returns error code
25
.
Is there a documentation for this change?
In this realm-core file, error code 25 is called value_duplicate_name
, so at least I can see some logic for the (2) error, though error code account_name_in_use = 49
still exists. But error code 24 is linked to value_already_exists
, which makes no sense for the (1) “confirmation needed” error.
Is there a logic behind this change? Handling realm errors when it’s so poorly documented is already a challenge, if you start changing the codes between versions it’s not maintainable at all anymore…