Commit 2866f6d
committed
fix(telemetry): handle EPIPE errors from piped stdout gracefully
When CLI output is piped through commands like `head` or `jq`, closing
the pipe causes EPIPE (errno -32) write errors. These surfaced as fatal
uncaught exceptions in Sentry (14 issues, ~34 events) because there was
no error handler on stdout/stderr streams.
- Register error handlers on process.stdout/stderr that exit cleanly
(code 0) on EPIPE, matching standard CLI behavior (gh, npm, etc.)
- Add isEpipeError() helper and wire it into beforeSend to drop any
EPIPE events that still reach Sentry as a safety net
- Resolve all 14 existing EPIPE issues on Sentry1 parent 805804e commit 2866f6d
2 files changed
+56
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
17 | 31 | | |
18 | 32 | | |
19 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
158 | 193 | | |
159 | 194 | | |
160 | 195 | | |
| |||
206 | 241 | | |
207 | 242 | | |
208 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
209 | 251 | | |
210 | 252 | | |
211 | 253 | | |
| |||
0 commit comments