Skip to content

Commit

Permalink
feat: add warning log for retried put op
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Sep 23, 2024
1 parent c43616a commit 772dac2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/store/bucket-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export function createBucketClient (conf, context) {

// retry to avoid throttling errors
try {
await pRetry(() => bucketClient.send(putCmd))
await pRetry(() => bucketClient.send(putCmd), {
onFailedAttempt: err => console.warn(`failed to put object: ${key}`, err)
})
} catch (/** @type {any} */ error) {
return {
error: new StoreOperationFailed(error.message)
Expand Down

0 comments on commit 772dac2

Please sign in to comment.