Skip to content

Unhandled promise rejection #9

@kapvode

Description

@kapvode

I've encountered an unhandled promise rejection that I was able to track down and fix with the following patch.

diff --git a/extract.js b/extract.js
index 18e614e..e657bc3 100644
--- a/extract.js
+++ b/extract.js
@@ -27,7 +27,7 @@ module.exports = function (req, dest, fnDestFilename, opts = {}) {
 
             resolve(rs)
           })
-      }))
+      }).catch(reject))
     })
 
     busboy.on('field', (name, value) => {

I think it happened when there was a problem with GlusterFS. I was able to reproduce it using SSHFS, but it's not simple.

There is a Promise.all(files).catch(reject) further down, but it's too late.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions