Skip to content

Commit

Permalink
Clean up logging for S3 read/write paths (#2074)
Browse files Browse the repository at this point in the history
  • Loading branch information
dubwub authored Jan 24, 2025
1 parent d3cd611 commit f997bee
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@ export async function loadDocsDefinitionFromS3({
dateLessThan: new Date(Date.now() + 1000 * 60 * 60 * 24 * 30).toString(),
});
const response = await fetch(signedUrl);
console.log("signedUrl", signedUrl);
console.log("response.ok", response.ok);
if (response.ok) {
console.log("Successfully loaded docs definition from S3: ", signedUrl);
const json = await response.json();
return json as FdrAPI.docs.v2.read.LoadDocsForUrlResponse;
}
throw new Error(
`Failed to load docs definition. Status: ${response.status}. Error: ${await response.text()}`
`Failed to load docs definition from S3. Status: ${response.status}. Error: ${await response.text()}`
);
} catch (error) {
console.error("Error loading docs definition from S3:", error);
Expand Down

0 comments on commit f997bee

Please sign in to comment.