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

Send ERROR event when something goes wrong in event processing logic #17

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

r-n-o
Copy link
Collaborator

@r-n-o r-n-o commented Nov 16, 2023

Pretty simple change: let's try/catch around events we're receiving / processing and "throw" errors via postMessage. Parent pages do not have the ability to catch errors within cross-domain iframes unfortunately.

As step (2) I'll listen for these events in our SDK and make sure to bubble them as errors by rejecting the promise so callers can chain (injectBundle.then(...).catch(...))

@r-n-o r-n-o requested review from oliviathet and emostov November 16, 2023 23:55
Copy link
Contributor

@oliviathet oliviathet left a comment

Choose a reason for hiding this comment

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

ah, much-needed fix and plan for step 2!

@r-n-o r-n-o merged commit 1adaa70 into main Nov 17, 2023
5 checks passed
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.

3 participants