Commit 082c253
g97iulio1609
fix: preserve HTTP status code in streamable HTTP client error messages
When the streamable HTTP transport receives a 4xx/5xx response it
currently reports a generic 'Server returned an error response' message,
discarding the actual HTTP status code and any response body. This
makes it very hard to debug upstream issues (e.g. 401 vs 403 vs 502).
Include the HTTP status code and up to 200 chars of the response body
in the error message so callers get actionable diagnostics.
Fixes #21101 parent 62575ed commit 082c253
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
280 | 287 | | |
281 | 288 | | |
282 | 289 | | |
| |||
0 commit comments