Commit 6ab6d0c
committed
fix(@probitas/probitas): suppress node:http2 BadResource errors in subprocess
Add unhandledrejection handler to subprocess run template, mirroring the
error suppression strategy used in the previous Worker-based execution.
The "Bad resource ID" errors from node:http2 occur during HTTP/2 stream
cleanup when the subprocess exits. These errors don't affect test
correctness but caused subprocess crashes.
The previous commit (d820216) improved resource cleanup by awaiting
writer.close() and reordering parent-subprocess cleanup. However, the
100ms grace period was a workaround. This commit replaces the timeout
approach with proper error suppression, matching Worker behavior:
- Add globalThis unhandledrejection listener in run.ts
- Silently ignore BadResource errors from node:http2
- Log other unhandled rejections for debugging
- Remove 100ms grace period (revert to 0ms)
This allows HTTP/2 cleanup errors to be safely ignored while preserving
error visibility for legitimate issues.1 parent d820216 commit 6ab6d0c
2 files changed
Lines changed: 28 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
| 87 | + | |
| 88 | + | |
89 | 89 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
37 | 61 | | |
38 | 62 | | |
39 | 63 | | |
| |||
156 | 180 | | |
157 | 181 | | |
158 | 182 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 183 | + | |
| 184 | + | |
163 | 185 | | |
0 commit comments