Skip to content

Error: The 'cache' field on 'RequestInitializerDict' is not implemented. #6493

@2820402

Description

@2820402

Checkboxes for prior research

Describe the bug

export const r2 = (c: RequestT) => {
    const { R2_ENDPOINT, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY } = env<ENV>(
        c,
        'workerd'
    );

    return new S3Client({
        region: 'auto',
        endpoint: R2_ENDPOINT,
        credentials: {
            accessKeyId: R2_ACCESS_KEY_ID,
            secretAccessKey: R2_SECRET_ACCESS_KEY,
        },
    });
};

when I create CreateMultipartUploadCommand I got that error

const command = new CreateMultipartUploadCommand({ ...params });
console.log('command', command); // confirm this is print in console
const response = await r2(c).send(command); // this throw the error which catch in catch block

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

"@aws-sdk/client-s3": "^3.654.0"

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

cloudflare workers runtime

Reproduction Steps

.

Observed Behavior

Error: The 'cache' field on 'RequestInitializerDict' is not implemented.

Expected Behavior

Don't get that error

Possible Solution

No response

Additional Information/Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions