Skip to content

New IterableEmbeddedUpdateHandler methods for sync failure and success.#989

Open
franco-zalamena-iterable wants to merge 5 commits intomasterfrom
SDK-302-Expose-callbacks
Open

New IterableEmbeddedUpdateHandler methods for sync failure and success.#989
franco-zalamena-iterable wants to merge 5 commits intomasterfrom
SDK-302-Expose-callbacks

Conversation

@franco-zalamena-iterable
Copy link
Contributor

@franco-zalamena-iterable franco-zalamena-iterable commented Feb 11, 2026

🔹 Jira Ticket(s) if any

✏️ Description

Creating new methods regarding sync success and failures for users to be able to act upon result.
Matching listener style from ios side
ios merged pr: Iterable/iterable-swift-sdk#988

Comment on lines +79 to +84
try {
processEmbeddedMessagesResponse(data)
} catch (e: JSONException) {
IterableLogger.e(TAG, e.toString())
}
notifySyncSucceeded()
Copy link
Member

Choose a reason for hiding this comment

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

We should move notifySyncSucceeded() inside the try block, and add a notifySyncFailed(e.message) to the catch. So it matches iOS behavior exactly: parse errors won't falsely report success.

Suggested change
try {
processEmbeddedMessagesResponse(data)
} catch (e: JSONException) {
IterableLogger.e(TAG, e.toString())
}
notifySyncSucceeded()
try {
processEmbeddedMessagesResponse(data)
notifySyncSucceeded()
} catch (e: JSONException) {
IterableLogger.e(TAG, e.toString())
notifySyncFailed(e.message)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree with @joaodordio

@joaodordio joaodordio force-pushed the SDK-302-Expose-callbacks branch from 276b142 to d8bb8e4 Compare March 19, 2026 15:21
Copy link
Collaborator

@sumeruchat sumeruchat left a comment

Choose a reason for hiding this comment

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

Also is the refactoring really necesssary. Any refactor runs the risk of introducing regressions. Lets try to get the minimum changeset that accomplishes the task and has no side effects.

@franco-zalamena-iterable
Copy link
Contributor Author

Also is the refactoring really necesssary. Any refactor runs the risk of introducing regressions. Lets try to get the minimum changeset that accomplishes the task and has no side effects.

Yes i think we should have android and ios matching, this change introduces no behavior change, it is only new callbacks

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.

4 participants