Skip to content

Commit

Permalink
fix(core): catch error on aws backup storage client creation (#4647)
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi authored Nov 6, 2024
1 parent 7780c16 commit 847bad9
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 847bad9

Please sign in to comment.