-
Notifications
You must be signed in to change notification settings - Fork 597
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
aws-sdk's AbortSignal can't be given to Response #4582
Comments
Hi @koSakano , Can confirm this is only happening after bundling for web. |
@RanVaknin |
For browsers, don't bundle the AbortController implementation from the Just use the browser's native AbortController, and it should be fine. |
@kuhe // The browser's native AbortController
const abortController = new AbortController();
const client = new S3Client(clientParams);
const requestPromise = client.send(new CreateBucketCommand(commandParams), {
// error occurred
abortSignal: abortController.signal,
}); For example, in this case you will get the following error.
|
override the type error with |
in #4591 I've loosened the type requirement such that this should no longer be a compilation error in future versions |
@kuhe |
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. |
Checkboxes for prior research
Describe the bug
The
abortController.signal
passed toclient.send
is internally passed toRespnose
, but an error occurred in that area.SDK version number
@aws-sdk/[email protected] @aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Browser
Details of the browser/Node.js/ReactNative version
Chrome: 111.0.5563.110
Reproduction Steps
aws-sdk-js-v3/packages/fetch-http-handler/src/fetch-http-handler.ts
Line 75 in 9152e21
Observed Behavior
TypeError: Failed to construct 'Request': Failed to read the 'signal' property from 'RequestInit': Failed to convert value to 'AbortSignal'.
Expected Behavior
Works like a standard AbortController.
Possible Solution
No response
Additional Information/Context
No response
The text was updated successfully, but these errors were encountered: