-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Use sync error domain errors from network client #4580
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making this fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, we can't rename RLMSyncAuthErrorInvalidCredential
to RLMSyncAuthErrorInvalidCredentials
, despite it being correct, because the sync APIs are now out of beta and so we're sticking to SemVer for them, and renaming this would break the public API.
Sorry for a delay on this. I've updated the PR and added a corresponding test to check the reported error domain. |
I don't know if this comment is still accurate after your latest changes, but that's not quite right, as "user already exists" could be reported if the current user is an admin. |
It doesn't look like "user already exists" can be reported in any cases at all anymore (@mrackwitz please correct me if I'm wrong) while "user doesn't exists" can be reported when working with permissions, so it's not really a "SyncDomain" error. I think if nothing is planned to be changed back on a server-side we should deprecate |
Network client handles some sync-related (e.g. authentication) errors that should be reported by SyncManager directly.
Note that currently ROS never reports
RLMSyncAuthErrorUserAlreadyExists
,RLMSyncAuthErrorUserDoesNotExist
codes and I'm not sure if that's changed. So probably this codes should be removed andInvalidCredentials
could be moved toRLMSyncError
enum.@austinzheng, @jpsim let me know what you think.