diff --git a/lib/aws/aws.mod.test.ts b/lib/aws/aws.mod.test.ts index bf61d45..617a4d5 100644 --- a/lib/aws/aws.mod.test.ts +++ b/lib/aws/aws.mod.test.ts @@ -68,7 +68,7 @@ describe("AWS S3 integration tests with LocalStack", () => { key: "test-key", }); - console.log({ data }); + console.log("getObject", { data }); expect(data).toBeDefined(); }); }); diff --git a/lib/aws/mod.ts b/lib/aws/mod.ts index d7110fe..04a61b7 100644 --- a/lib/aws/mod.ts +++ b/lib/aws/mod.ts @@ -105,11 +105,11 @@ export async function getObject({ }) ); - if (!data.Body) { + if (!data) { throw new Error("No data in the response"); } - return data.Body; + return data; } catch (error) { console.error("Error getting object:", error); return null;