Skip to content

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented May 23, 2025

Issue

Avoid conflicts with JS-5860

Description

Uses block for token provider call

Testing

N/A, as it's formatting change


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

@trivikr trivikr requested a review from a team as a code owner May 23, 2025 03:22
.addImport("FromSsoInit", null, AwsDependency.TOKEN_PROVIDERS)
.write("async (idProps) => await nodeProvider(idProps as FromSsoInit)(idProps)"))
.openBlock("async (idProps) => {", "}", () -> {
w.write("return await nodeProvider(idProps as FromSsoInit)(idProps);");
Copy link
Contributor

Choose a reason for hiding this comment

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

async function can return without await

Copy link
Member Author

Choose a reason for hiding this comment

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

It can, but we want errors to be thrown inside the function block, for changes coming up in future.
Not specifically for this line, but when we'll add a try block in future.

If it returns without await the error will be thrown where it's awaited by callee.

@trivikr trivikr merged commit a38fab7 into main May 23, 2025
5 checks passed
Copy link

github-actions bot commented Jun 7, 2025

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2025
@trivikr trivikr deleted the block-token-provider branch July 1, 2025 17:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants