Skip to content
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

Merged
merged 4 commits into from
May 28, 2020
Merged

fix: (null) aliases #255

merged 4 commits into from
May 28, 2020

Conversation

aboedo
Copy link
Member

@aboedo aboedo commented May 27, 2020

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.

@aboedo aboedo self-assigned this May 27, 2020
@@ -52,7 +52,8 @@ typedef NS_ERROR_ENUM(RCPurchasesErrorDomain, RCPurchasesErrorCode) {
RCIneligibleError,
RCInsufficientPermissionsError,
RCPaymentPendingError,
RCInvalidSubscriberAttributesError
RCInvalidSubscriberAttributesError,
RCMissingAppUserIDError
Copy link
Contributor

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.

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done 1bb4962

@aboedo aboedo requested a review from vegaro May 28, 2020 18:16
@aboedo aboedo merged commit 02450e8 into develop May 28, 2020
@aboedo aboedo deleted the fix/null_aliases branch May 28, 2020 18:35
@aboedo aboedo mentioned this pull request Feb 8, 2021
@aboedo aboedo mentioned this pull request Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants