Requests can hang with malformed JSONs; depends on error handling
Jayden,

Great work on the library, and thanks for pushing guys @ Apollo. Your workaround works well enough so that I wouldn't care about them fixing their own dependency.

I am now using graphql-upload@8.0.1 with Express and have found this one rather small issue.

In the express middleware you have written code which (please correct me if I am wrong) is meant to delay the final response until the upload has ended:

- https://github.com/jaydenseric/graphql-upload/blob/master/src/graphqlUploadExpress.mjs#L36

- https://github.com/jaydenseric/graphql-upload/blob/master/src/graphqlUploadExpress.mjs#L32.

The issue is that the `finished` promise is listening for `request.on("end")`, which apparently doesn't happen if an error occurs while uploading. Scenario is this:

1. Send a malformed request (e.q. an invalid `operations` JSON).
2. Have an error handler, which uses `request.send` (or `.json` - it resolves to `.send`). E.g. I have this little piece:

```
app.use((err, _, res, __) => {
  res.status(err.status).json({
    message: httpStatus[err.status],
    stack: config.printErrorStack ? err.stack : {}
  });
});
```

When `.json()` is called, the flow goes to your middleware:

https://github.com/jaydenseric/graphql-upload/blob/master/src/graphqlUploadExpress.mjs#L36

However, in this scenario the `end` event is never fired on the `request`. Two workarounds are available:

1. Use `response.end()` instead of `.send()` or `.json()`. I'd like to stick with `.json`, however.
2. Manually emit the `end` event in case of an error: `request.emit("end")`.

Questions to you:

1. Do I understand your code correctly?
2. Do you know why the `end` event is not firing in case of an error in the upload middleware?
3. Does emitting `end` manually seem like a good fix which can be applied now?
4. Would you fix this? I guess you could do this using processRequest.catch() but I am not sure what your desired outcome would be in this case.