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 onError of unsuccessful /identify calls #359

Merged
merged 5 commits into from Sep 15, 2021
Merged

Fix onError of unsuccessful /identify calls #359

merged 5 commits into from Sep 15, 2021

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Sep 15, 2021

I broke the error treatment for unsuccessful /identify calls in this PR #358

I was calling onError instead of the onErrorHandler. I added some tests since we didn't have any tests that could catch this.

synchronized(this@Backend) {
identifyCallbacks.remove(cacheKey)
}?.forEach { (_, onErrorHandler) ->
onError(result.toPurchasesError().also { errorLog(it) })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the bug 😮‍💨

I should have called onErrorHandler instead of onError

@vegaro vegaro requested a review from a team September 15, 2021 21:08
Copy link
Contributor

@taquitos taquitos left a comment

Choose a reason for hiding this comment

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

🥅 ⚽ 🐐

@vegaro vegaro merged commit 7de90d8 into main Sep 15, 2021
@vegaro vegaro deleted the fix-callbacks branch September 15, 2021 22:32
@vegaro vegaro mentioned this pull request Sep 15, 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.

None yet

2 participants