Skip to main content

Module error_extract

Module error_extract 

Source
Expand description

SQLSTATE-based Hyper error classification.

Phase 0 spike S5 confirmed that Hyper returns PostgreSQL SQLSTATE codes as a structured field on Error::Server. We branch on the stable code, not fragile message text, so Hyper message wording changes don’t break us.

Relevant codes:

  • 42P01 — undefined_table → extract the table name and seed-and-retry
  • 42703 — undefined_column → report the column name verbatim
  • 42601 — syntax_error → forward the message verbatim
  • anything else → forward as HyperError

Enums§

ErrorClass
Classification of a Hyper error for compile-time validation purposes.

Functions§

classify
Classify a hyperdb_api::Error by its SQLSTATE code.