Skip to content

Sumeru / #469 - Surface push registration errors instead of failing silently#852

Open
sumeruchat wants to merge 1 commit intomasterfrom
sumeru/469-surface-push-registration-errors
Open

Sumeru / #469 - Surface push registration errors instead of failing silently#852
sumeruchat wants to merge 1 commit intomasterfrom
sumeru/469-surface-push-registration-errors

Conversation

@sumeruchat
Copy link
Copy Markdown

Summary

  • Implements onTokenRegistrationFailed callback on both iOS and Android native modules, which was previously empty (iOS) or missing (Android)
  • Emits a new handleTokenRegistrationFailedCalled event from native to JS when push token registration fails
  • Always logs console.error with a helpful message when registration fails, so developers see the error even without configuring a callback
  • Adds onTokenRegistrationFailed callback to IterableConfig for programmatic error handling

Test plan

  • Set an invalid pushIntegrationName and verify error is logged to console
  • Set an invalid pushIntegrationName with onTokenRegistrationFailed callback and verify callback is invoked with reason
  • Verify successful push registration still works normally
  • Test on both iOS and Android

🤖 Generated with Claude Code

When pushIntegrationName is set to an invalid value, the
registerDeviceToken API call fails but the error was silently swallowed
in the native layer. This change implements the onTokenRegistrationFailed
callback on both iOS and Android native modules to emit an event to the
React Native layer. A console.error is always logged, and developers can
optionally provide an onTokenRegistrationFailed callback in IterableConfig
for programmatic error handling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sumeruchat sumeruchat self-assigned this Apr 7, 2026
@sumeruchat sumeruchat added the Experimental Experimental fix generated by AI label Apr 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Lines Statements Branches Functions
Coverage: 62%
62.89% (400/636) 39.76% (103/259) 61.23% (139/227)

@qltysh
Copy link
Copy Markdown

qltysh bot commented Apr 7, 2026

Qlty

Coverage Impact

⬇️ Merging this pull request will decrease total coverage on master by 0.18%.

Modified Files with Diff Coverage (1)

RatingFile% DiffUncovered Line #s
Coverage rating: A Coverage rating: A
src/core/classes/Iterable.ts40.0%1122-1131
Total40.0%
🤖 Increase coverage with AI coding...

In the `sumeru/469-surface-push-registration-errors` branch, add test coverage for this new code:

- `src/core/classes/Iterable.ts` -- Line 1122-1131

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Experimental Experimental fix generated by AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants