Skip to content

fix(pgwire): answer a real class for the arm-less error variants - #361

Merged
EnRaiha merged 1 commit into
fix/shaper-mapperfrom
fix/sqlstate-classify-bridge
Sep 20, 2026
Merged

EnRaiha merged 1 commit into
fix/shaper-mapperfrom
fix/sqlstate-classify-bridge

Conversation

@EnRaiha

@EnRaiha EnRaiha commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Folded into #359: the fallback bridge is the same table's completion, so it ships in the mapper PR instead of a stacked one.

The blanket INTERNAL_ERROR fallback in error_to_sqlstate flattened 65 of the
101 crate::Error variants, so a statement reading a balance, hitting a period
lock, a legal hold, a retention floor, a type guard, or a mirror write got
XX000 while the crate's classify() map already carried the class. The
fallback now borrows it through classify() and answers from the same numeric
table the remote path reads.

The bridge exposed one arm doing harm: RetryableSchemaChanged classified as a
plan error, which reads as 'fix your SQL' for a condition the lease paths
retry. It now classifies as a write conflict (40001), matching its contract.
Copilot AI lite review requested due to automatic review settings September 20, 2026 14:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@EnRaiha EnRaiha added the run-ci Opt this PR into the full test suite; re-add to force a re-run label Sep 20, 2026
@EnRaiha
EnRaiha merged commit e02a1d6 into fix/shaper-mapper Sep 20, 2026
@farhan-syah
farhan-syah deleted the fix/sqlstate-classify-bridge branch September 23, 2026 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci Opt this PR into the full test suite; re-add to force a re-run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants