Skip to content

Comments

Add MessageDispatcher class that queues messages when WebView is unavailable#451

Open
maycon-mello wants to merge 9 commits intomasterfrom
DCKA-5365-something-went-wrong-on-the
Open

Add MessageDispatcher class that queues messages when WebView is unavailable#451
maycon-mello wants to merge 9 commits intomasterfrom
DCKA-5365-something-went-wrong-on-the

Conversation

@maycon-mello
Copy link
Collaborator

No description provided.

return await credentialProvider.addCredential(credential);
} catch (err) {
if (!err.message?.includes('already exists')) throw err;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want that debug log still if the credential already exists? Or do you think it's okay to let that be silent?

this._send(webView, type, body);
this._send(webView, type, body);
} catch (err) {
console.warn('Failed to process queued message, discarding:', err.message);
Copy link
Contributor

Choose a reason for hiding this comment

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

at some point we may need to make this smarter to check for errors that might be transient which would allow the message to be processed successfully in the future

we could also look at some of the queuing patterns around dead letter queues which might allow us to try to reprocess messages in the future if meaningful changes occur that would allow it

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