Open clementetb opened 1 year ago
We tried to solve this through the Exception type hierarchy. This could point to us needing to extend this hierarchy.
What was the exact use case that caused this?
I was trying to automatically register a user when logging in. The thing is that I tried to register and then log in, doing it the other way around (logging in and then registering) solves the issue because we have an exception to catch when a user does not exist. So there is no need to extend the hierarchy.
After discussion, we need to verify this check actually works:
ErrorCode.RLM_ERR_ACCOUNT_NAME_IN_USE -> {
UserAlreadyExistsException(msg)
}
Problem
The user has no access to the error code property in app exceptions, if they like to react to a specific error code they have to do string matching.
Solution
Expose the error code as a public property.
Alternatives
No response
How important is this improvement for you?
Would be a major improvement
Feature would mainly be used with
Atlas Device Sync