Skip to content

Commit

Permalink
chore: adds debug messages in createBucket
Browse files Browse the repository at this point in the history
  • Loading branch information
glamperd committed Sep 23, 2024
1 parent 1e87ae2 commit 1ef3054
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/backend/src/functions/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export const createBucket = functions
const S3 = await getS3Client()

try {
printLog(`Creating AWS S3 bucket ${data.bucketName} ...`, LogLevel.LOG)
// Try to get information about the bucket.
await S3.send(new HeadBucketCommand({ Bucket: data.bucketName }))
// If the command succeeded, the bucket exists, throw an error.
Expand Down
1 change: 1 addition & 0 deletions packages/phase2cli/src/commands/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ export const handleCeremonyBucketCreation = async (

try {
// Make the call to create the bucket.
spinner.info(`Creating bucket ${bucketName}`)
await createS3Bucket(firebaseFunctions, bucketName)
} catch (error: any) {
const errorBody = JSON.parse(JSON.stringify(error))
Expand Down

0 comments on commit 1ef3054

Please sign in to comment.