-
Notifications
You must be signed in to change notification settings - Fork 316
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
fix: (null)
aliases
#255
fix: (null)
aliases
#255
Conversation
…ppUserID is null, to prevent the null alias
Purchases/Public/RCPurchasesErrors.h
Outdated
@@ -52,7 +52,8 @@ typedef NS_ERROR_ENUM(RCPurchasesErrorDomain, RCPurchasesErrorCode) { | |||
RCIneligibleError, | |||
RCInsufficientPermissionsError, | |||
RCPaymentPendingError, | |||
RCInvalidSubscriberAttributesError | |||
RCInvalidSubscriberAttributesError, | |||
RCMissingAppUserIDError |
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.
We already have RCInvalidAppUserIdError
, should we reuse that one? Maybe we can change the wording in RCInvalidAppUserIdError
to be The app user id is not valid or it's missing.
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.
oops, totally missed that one! I'll use it instead
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.
done 1bb4962
Fixes an issue where if the appUserID is missing for whatever reason and you call createAlias, an alias to
(null)
would be created.This fix makes the method no-op and return an error with a specific error code.
I was hesitant about adding the error code at first, but it's probably the best way to get developers to notice without sending the call to the backend.