Skip to content

Commit

Permalink
fix(core): catch error on aws backup storage client creation
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi committed Nov 6, 2024
1 parent 7780c16 commit e78151a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/api/src/app/admin/backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ export const uploadBackup =
},
},
async () => {
const client = new S3Client({})
const command = new PutObjectCommand({
Bucket: LND_SCB_BACKUP_BUCKET_NAME,
Key: `lnd_scb/${filename}`,
Body: backup,
ContentMD5: createHash("md5").update(backup).digest("base64"),
})
try {
const client = new S3Client({})
const command = new PutObjectCommand({
Bucket: LND_SCB_BACKUP_BUCKET_NAME,
Key: `lnd_scb/${filename}`,
Body: backup,
ContentMD5: createHash("md5").update(backup).digest("base64"),
})
client.send(command)
logger.info({ backup }, "Static channel backup to AWS successful.")
addEventToCurrentSpan("Static channel backup to AWS successful.")
Expand Down

0 comments on commit e78151a

Please sign in to comment.