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

fix: await pinpoint response #11993

Merged

Conversation

sdstolworthy
Copy link
Contributor

Description of changes

This awaits a previously unawaited call to the pinpoint sdk.

Issue #, if available

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sdstolworthy sdstolworthy requested a review from a team as a code owner February 13, 2023 20:11
@@ -63,24 +61,23 @@ export const enable = async (context: $TSContext, successMessage: string | undef

spinner.start('Enabling FCM channel.');
try {
const data = context.exeInfo.pinpointClient.updateGcmChannel(params).promise();
const data = await context.exeInfo.pinpointClient.updateGcmChannel(params).promise();
Copy link
Member

Choose a reason for hiding this comment

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

didn't linter catch this for some reason ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pinpoint client isn't typed. I found this while trying to add types to exeInfo. The linter couldn't catch this because it doesn't know the type of pinpointClient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But to better answer the question, yes. The typescript ESLint plugin will flag unhandled promises.

@sdstolworthy sdstolworthy merged commit c47b505 into aws-amplify:dev Feb 13, 2023
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.

None yet

3 participants