mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-26 06:40:48 +00:00
handle error when listing bucket
This commit is contained in:
parent
801b5653e4
commit
07e53bbb2f
1 changed files with 3 additions and 0 deletions
|
@ -104,6 +104,9 @@ module.exports =
|
|||
secret: settings.filestore.s3.secret
|
||||
bucket: bucketName
|
||||
s3Client.list prefix:key, (err, data)->
|
||||
if err?
|
||||
logger.err err:err, bucketName:bucketName, key:key, "something went wrong listing prefix in aws"
|
||||
return callback(err)
|
||||
keys = _.map data.Contents, (entry)->
|
||||
return entry.Key
|
||||
s3Client.deleteMultiple keys, callback
|
||||
|
|
Loading…
Reference in a new issue