EPIPE errors from aborted request
- Dominant language
- JavaScript
- Stars
- 14.8k
- Forks
- 1.4k
- Avg merge
- 22d 3h
- Merged PRs (30d)
- 1
Description
#### Support plan
* *is this issue currently blocking your project?* (yes/no): no
* *is this issue affecting a production system?* (yes/no): yes
#### Context
* *node version*: 14.18.0
* *module version with issue*: 20.1.5
* *last module version without issue*: unknown
* *environment* (e.g. node, browser, native): Node
* *used with* (e.g. hapi application, another framework, standalone, ...): hapi application
* *any other relevant information*: N/A
#### What are you trying to achieve or the steps to reproduce?
Our Sentry setup has caught and logged the following error several times:
```
Error: write EPIPE
File "internal/stream_base_commons.js", line 156, col 25, in afterWriteDispatched
File "internal/stream_base_commons.js", line 147, col 3, in writeGeneric
File "net.js", line 787, col 11, in Socket._writeGeneric
File "net.js", line 799, col 8, in Socket._write
File "internal/streams/writable.js", line 358, col 12, in writeOrBuffer
File "internal/streams/writable.js", line 303, col 10, in Socket.Writable.write
File "_http_outgoing.js", line 351, col 17, in ServerResponse._writeRaw
File "_http_outgoing.js", line 327, col 15, in ServerResponse._send
File "_http_outgoing.js", line 846, col 10, in ServerResponse.end
File "/home/app/deploy/node_modules/@hapi/hapi/lib/transmit.js", line 318, col 21, in internals.end
request.raw.res.end(); // Triggers injection promise resolve
```
This apparently happens when the client aborts its request; it's preceded by `["request","error","abort"]` and `["response","error","aborted"]` error messages.
We've gotten several errors like this, although I haven't yet tried to reproduce it locally or on demand.
#### What was the result you got?
An EPIPE error from an apparently uncaught exception.
#### What result did you expect?
No additional errors logged other than the abort message.
Contributor guide
Assessment
This issue has not been assessed yet.