Commit a360b7d
committed
feat: improve error handling by extracting root cause messages
- Add findRootCause() utility method utility to traverse exception chains
- Update McpServerSession and McpStreamableServerSession to use root cause messages
- Ensures meaningful error messages are returned instead of wrapped exception messages
Signed-off-by: Christian Tzolov <[email protected]>1 parent b026492 commit a360b7d
File tree
3 files changed
+16
-5
lines changed- mcp-core/src/main/java/io/modelcontextprotocol/spec
3 files changed
+16
-5
lines changedLines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
81 | 90 | | |
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
227 | 231 | | |
228 | | - | |
229 | | - | |
| 232 | + | |
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
| |||
287 | 290 | | |
288 | 291 | | |
289 | 292 | | |
290 | | - | |
| 293 | + | |
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | 184 | | |
186 | | - | |
| 185 | + | |
187 | 186 | | |
188 | 187 | | |
189 | 188 | | |
| |||
0 commit comments