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

[BUG] AWS SIGv4 signer does not fully implement TransportRequestPromise #819

Closed
u873838 opened this issue Jul 17, 2024 · 1 comment · Fixed by #823
Closed

[BUG] AWS SIGv4 signer does not fully implement TransportRequestPromise #819

u873838 opened this issue Jul 17, 2024 · 1 comment · Fixed by #823

Comments

@u873838
Copy link
Contributor

u873838 commented Jul 17, 2024

What is the bug?

The AwsSigv4SignerTransport.request method does not return a Promise that implements all of the TransportRequestPromise members.

export interface TransportRequestPromise<T> extends Promise<T> {
abort: () => void;
finally(onFinally?: (() => void) | undefined | null): Promise<T>;
}

class AwsSigv4SignerTransport extends Transport {
request(params, options = {}, callback = undefined) {

How can one reproduce the bug?

Create a new Client that uses the AWS SIGV4 signer.
Then attempting to call .abort() on the returned Promise of any of the client API methods will result in a TypeError being thrown.

What is the expected behavior?

The method should exist on the Promise returned by the Transport; in-flight requests that are SIGV4 signed should be abortable.

Do you have any additional context?

The 3.X fix is to accept an AbortSignal parameter on API methods which will allow in-flight requests to be cancelled.

@dblock
Copy link
Member

dblock commented Jul 17, 2024

Does this need to wait for 3.0? Care to contribute to the current version?

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 a pull request may close this issue.

3 participants