-
Notifications
You must be signed in to change notification settings - Fork 61
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
[RKOTLIN-1102] Remove nullability check in SubscriptionSetImpl.waitForSynchronization
#1778
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.
LGTM
@@ -369,7 +369,7 @@ class CredentialsTests { | |||
payload = mapOf("mail" to TestHelper.randomEmail(), "id" to 0) | |||
) | |||
|
|||
assertFailsWithMessage<AuthException>("unauthorized") { | |||
assertFailsWithMessage<AuthException>("Authentication failed") { |
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.
Hmm. Weird that this has to go the other way. Was updated on the server two weeks ago and seemed pretty consistent with unauthorized
throughout the server 🤔 But I guess it is ok, since it is just a test assertion 🤷
packages/library-base/src/commonMain/kotlin/io/realm/kotlin/exceptions/RealmException.kt
Outdated
Show resolved
Hide resolved
@@ -127,7 +127,7 @@ internal class SubscriptionSetImpl<T : BaseRealm>( | |||
if (result) { | |||
return true | |||
} else { | |||
throw BadFlexibleSyncQueryException(errorMessage!!) | |||
throw BadFlexibleSyncQueryException(errorMessage) |
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.
is this nullable because RealmInterop.realm_sync_subscriptionset_error_str
can return null/empty?
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.
Yes, it looks like it.
closes #1777
Removes a nullability check on the synchronization error message that is causing a null pointer exception crash