Commit 63b1b27
committed
Add HTTP status context to XML parsing errors using PEP 678 notes
When XML parsing fails due to empty or malformed responses, users now
receive the actual HTTP error response from the service alongside the
parsing error, providing useful information about what actually happened.
Before:
ResponseParserError: Unable to parse response (no element found:
line 1, column 0), invalid XML received. Further retries may succeed: b''
After:
ResponseParserError: Unable to parse response (no element found:
line 1, column 0), invalid XML received. Further retries may succeed: b''
HTTP 413: Content Too Large
This exposes the real service error (HTTP 413: Content Too Large) that
was previously hidden behind cryptic XML parsing failures, giving users
actionable information about why their request failed.1 parent c660cc8 commit 63b1b27
2 files changed
Lines changed: 60 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
595 | | - | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
596 | 604 | | |
597 | 605 | | |
598 | 606 | | |
| |||
1447 | 1455 | | |
1448 | 1456 | | |
1449 | 1457 | | |
1450 | | - | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
1451 | 1467 | | |
1452 | 1468 | | |
1453 | 1469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1621 | 1621 | | |
1622 | 1622 | | |
1623 | 1623 | | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
1624 | 1666 | | |
1625 | 1667 | | |
1626 | 1668 | | |
| |||
0 commit comments