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

Gracefully handle rejected token Promise while creating real time subscription handshake link #708

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MUlfers
Copy link

@MUlfers MUlfers commented Feb 14, 2022

Issue #, if available:

Description of changes:
When using authentication type AWS_LAMBDA and providing the token as () => Promise<string> there is the possibility that the Promise is rejected.
The Promise is awaited with the call await this._awsRealTimeHeaderBasedAuth outside of any try catch block. This lead to a "Unhandled rejected promise" exception.
By moving the call into the existing try-catch block a rejected token Promise will be handled gracefully.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@MUlfers MUlfers changed the title move creation of header object into try catch block Gracefully handle rejected token Promise while creating real time subscription handshake link Feb 14, 2022
@MUlfers MUlfers force-pushed the bugfix/handle-rejected-token-prmose-when-starting-subscription branch from 7d15cbd to 37bfc21 Compare June 8, 2022 05:56
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.

1 participant