Skip to content

UnhandledPromiseRejectionWarning: Error: ENOSPC: #256

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

Closed

Comments

@PawelSuwinski
Copy link
Contributor

PawelSuwinski commented Nov 2, 2020

Hi

I am not sure if I am using it right (?), but just simple upload form and case of not enough space on disk gives UnhandledPromiseRejectionWarning:

// app.js
app.use(fileUpload({ useTempFiles: true }));
app.use((err, req, res, next) => res.status(500).send(err.message));

(node:11775) UnhandledPromiseRejectionWarning: Error: ENOSPC: no space left on device, write
(node:11775) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:11775) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)

At first glance it seams that Promise.all(req[waitFlushProperty]).then(...).catch(...) (lib/processMultipart.js) it is not enough to catch writeStream errors (?), but I am just at the begin of figuring it out.

Any hints?

--
regards
Paweł Suwiński

PawelSuwinski added a commit to PawelSuwinski/express-fileupload that referenced this issue Nov 4, 2020
PawelSuwinski added a commit to PawelSuwinski/express-fileupload that referenced this issue Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment