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

Paginator sends ...args in command instead of send operation #1665

Closed
trivikr opened this issue Nov 9, 2020 · 4 comments
Closed

Paginator sends ...args in command instead of send operation #1665

trivikr opened this issue Nov 9, 2020 · 4 comments
Assignees
Labels
bug This issue is a bug. High Priority

Comments

@trivikr
Copy link
Member

trivikr commented Nov 9, 2020

Describe the bug
Paginator sends ...args in command instead of send operation.

For example, in listTablesPaginator

return await client.send(new ListTablesCommand(input, ...args));

The ListCommand constructor accepts only one parameter:

constructor(readonly input: ListTablesCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

The options object should be passed as second parameter of send operation, and not Command constructor:

send<InputType extends ClientInput, OutputType extends ClientOutput>(
command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>,
options?: HandlerOptions
): Promise<OutputType>;

SDK version number
master

Is the issue in the browser/Node.js/ReactNative?
N/A

Details of the browser/Node.js/ReactNative version
N/A

To Reproduce (observed behavior)
Visit code

return await client.send(new ListTablesCommand(input, ...args));

Expected behavior
The options object should be passed as second parameter of send operation, and not Command constructor.

@alexforsyth
Copy link
Contributor

Taking a look here

@alexforsyth
Copy link
Contributor

Yep, you're right. This should read

return await client.send(new ListFunctionsCommand(input), ...args);

let me open a few PRs real quick

@alexforsyth
Copy link
Contributor

Issues merged. Moving to done and closing

@github-actions
Copy link

github-actions bot commented Jan 8, 2021

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 Jan 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. High Priority
Projects
None yet
Development

No branches or pull requests

2 participants