Skip to content

Commit 79cc9e2

Browse files
committed
fix(client-s3): use async in endpointValidator
1 parent afa6594 commit 79cc9e2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

clients/client-s3/S3.spec.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,16 @@ describe("endpoint", () => {
3434
});
3535

3636
describe("Accesspoint ARN", () => {
37-
const endpointValidator: BuildMiddleware<any, any> = (next, context) => (args) => {
37+
const endpointValidator: BuildMiddleware<any, any> = (next, context) => async (args) =>
3838
// middleware intercept the request and return it early
39-
const request = args.request as HttpRequest;
40-
return Promise.resolve({
39+
({
4140
output: {
4241
$metadata: { attempts: 0, httpStatusCode: 200 },
43-
request,
42+
request: args.request as HttpRequest,
4443
context,
4544
} as any,
4645
response: {} as any,
4746
});
48-
};
4947

5048
it("should succeed with access point ARN", async () => {
5149
const client = new S3({ region: "us-west-2" });

0 commit comments

Comments
 (0)