Ignore Errno::EPIPE error causes when reading body (Puma) #1294
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ignore Errno::EPIPE error causes when reading body
We got another report of the
Puma::ConnectionError
error being reported when upgrading our Ruby gem. The error cause is always the already ignoredErrno::EPIPE
error.It is reported by our response body wrapper that's called when instrumenting response bodies.
In this case the error was:
Puma::ConnectionError: Socket timeout writing data
The cause of this error was this error:
This doesn't look like an error people can act on to fix it, let's ignore it instead.
Related issue https://github.com/appsignal/support/issues/315
Add error specs for BodyWrapper close method
I noticed I broke something earlier while writing the previous commit in the close method, but it didn't fail any specs. That's because there weren't any for the error reporting. Add these errors so we can be sure it works.
Ignore error if nested cause is ignored
Traverse the error causes tree to see if any nested error cause is ignored.