Commit 7f10b23
committed
fix: use categorizer result consistently and unwrap AggregateException at top of GetFailureStateProperty
The method was computing a category via FailureCategorizer but then
ignoring it for routing, using separate type-checking logic against the
original (potentially wrapped) exception. This caused two bugs:
1. AggregateException wrapping e.g. TaskCanceledException would be
correctly categorized as Timeout by the categorizer, but the method's
own `e is TaskCanceledException` check would fail since `e` was still
the AggregateException.
2. The assertion check used a different string comparison
(InvariantCulture) than the categorizer (Ordinal) and only checked
for "Assertion" rather than also checking "Assert".
Now AggregateException is unwrapped once at the top, the unwrapped
exception is passed to the categorizer, and the FailureCategory enum
drives all routing and is used for constructing state properties.1 parent 30e0c29 commit 7f10b23
1 file changed
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
146 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
147 | 153 | | |
148 | 154 | | |
149 | | - | |
150 | | - | |
| 155 | + | |
| 156 | + | |
151 | 157 | | |
152 | 158 | | |
153 | 159 | | |
154 | 160 | | |
155 | 161 | | |
156 | | - | |
| 162 | + | |
157 | 163 | | |
158 | | - | |
| 164 | + | |
159 | 165 | | |
160 | 166 | | |
161 | | - | |
| 167 | + | |
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
| |||
0 commit comments