Commit 7b26242
committed
fix: do not report a control-flow throw as a crash, and stop losing the 500 one
The new boundary-layout reporter treated every throw as an error, so a layout
throwing redirect() while wrapping a 403 reached the app's APM sink and painted
a false dev error overlay over the page the user was looking at. That is the
classification the page path already makes before it reports, and it matters
more here because of what the overlay lands on top of. Sentinels are filtered
out now. They are still not HONOURED, which is deliberate and written down: the
status is decided by the time a boundary renders and the boundary page is the
answer to the request, so a layout redirect cannot replace a 403 the app asked
for with a bounce it did not.
The 500 path kept swallowing the same throw the commit before this one exists
to stop losing. Its fallthrough to the next boundary out is right, but the
sinks only ever heard the original page error, so a boundary or layout that
crashed while handling it vanished. It reports on the way past now.
The non-empty guard on the instrumentation prepend was unreachable and its
comment described a state the function cannot be in: the boundary file is
always pushed, since only pages and layouts are fed to the elision analysis.1 parent fc2fce3 commit 7b26242
2 files changed
Lines changed: 92 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
422 | 437 | | |
423 | 438 | | |
424 | 439 | | |
| 440 | + | |
425 | 441 | | |
426 | | - | |
| 442 | + | |
| 443 | + | |
427 | 444 | | |
428 | 445 | | |
429 | 446 | | |
430 | 447 | | |
431 | 448 | | |
432 | 449 | | |
433 | | - | |
| 450 | + | |
434 | 451 | | |
435 | 452 | | |
436 | 453 | | |
| |||
475 | 492 | | |
476 | 493 | | |
477 | 494 | | |
478 | | - | |
479 | | - | |
480 | | - | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
481 | 500 | | |
482 | 501 | | |
483 | 502 | | |
| |||
1070 | 1089 | | |
1071 | 1090 | | |
1072 | 1091 | | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
1073 | 1101 | | |
1074 | 1102 | | |
1075 | 1103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2127 | 2127 | | |
2128 | 2128 | | |
2129 | 2129 | | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
2130 | 2185 | | |
2131 | 2186 | | |
2132 | 2187 | | |
| |||
0 commit comments