Commit e3a2ab3
Plumb raw_message through cursor classifier; match no-tx on raw text; addr-suffix continuation failures; correct truncation marker unit
Five cycle-21 raw_message-pipeline follow-ups:
- ``_call_client``'s six non-OperationalError classifier arms
(DqliteConnectionError, ClusterPolicyError, ClusterError,
ProtocolError, DataError, InterfaceError catch-all) all dropped
``raw_message`` when wrapping into the dbapi exception. The
cycle-21 cursor commit only plumbed it through the
client.OperationalError → dbapi exception arm. Plumb on every
arm via ``getattr(e, "raw_message", None) or str(e)`` so callers
reading the un-truncated diagnostic don't need to walk
``__cause__`` based on which exception class the server emitted.
- ``_is_no_tx_rollback_error`` (client) and
``_is_no_transaction_error`` (dbapi) matched against ``str(exc)``
which is truncated to ~1 KiB. A long server message that has
the no-tx clause beyond the cap missed the substring and
surfaced the no-tx as a real error. Match against
``raw_message`` instead.
- ``DqliteProtocol._read_continuation``'s ServerFailure-mid-stream
arm raised ``OperationalError`` without the addr suffix, alone
among the eight ``raise OperationalError`` sites in the file.
Append it for log-correlation parity.
- ``OperationalError.message``'s truncation marker said "bytes" but
``len(message)`` and the slice cap are codepoints. An operator
reading the marker now sees "codepoints" — the actual unit.
- Connect-time wrap double-prefixed ``raw_message`` with
``"Failed to connect: "``. Cycle 21 introduced ``raw_message`` as
the verbatim-server-text contract; the prefix belongs on the
user-facing ``message`` only.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6d81ad8 commit e3a2ab3
3 files changed
Lines changed: 17 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
608 | 615 | | |
609 | 616 | | |
610 | 617 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | | - | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
772 | 775 | | |
773 | 776 | | |
774 | 777 | | |
| |||
0 commit comments