diff --git a/index.js b/index.js index b2a89780..c2ed3821 100644 --- a/index.js +++ b/index.js @@ -349,7 +349,7 @@ function fastifyMultipart (fastify, options, done) { // don't overwrite prototypes if (name in Object.prototype) { // ensure that stream is consumed, any error is suppressed - streamToNull(file) + streamToNull(file).catch(() => {}) onError(new PrototypeViolationError()) return }