Repository navigation
Commit 088fb71
committed
Ignore container error attribute on async completion
Prior to this commit, `ServerHttpObservationFilter` read the
`jakarta.servlet.error.exception` request attribute when an async
request completed and reported it to the observation. An exception that
escapes an async dispatch has already been reported by the filter or by
`AsyncListener#onError`, and the container exposes it wrapped in a
`ServletException`. The error was therefore reported once more, and the
"exception" key value changed from the root cause to `ServletException`.
This commit only reports the exception recorded with
`recordHandledException` when the async request completes.
Closes gh-377311 parent 70e1423 commit 088fb71
2 files changed
Lines changed: 26 additions & 1 deletion
File tree
- spring-web/src
- main/java/org/springframework/web/filter
- test/java/org/springframework/web/filter
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
236 | 240 | | |
237 | 241 | | |
238 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
203 | 224 | | |
204 | 225 | | |
205 | 226 | | |
| |||
0 commit comments