Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled promise rejection #9

Open
kapvode opened this issue Oct 15, 2019 · 0 comments
Open

Unhandled promise rejection #9

kapvode opened this issue Oct 15, 2019 · 0 comments

Comments

@kapvode
Copy link

kapvode commented Oct 15, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant