mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Refactor ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No(ish) ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description Start using the new Helio error codes. These are of the format M0000->M0ZZZ Convert helio_core to use M0001 for BadValue With the new error syntax, the errmsg is the user facing error message. Any PII Safe messages intended for the server will now be placed under errdetail_log (rather than errhint). ---- #### AI description (iteration 1) #### PR Classification New feature: Introduces a new error format and usage. #### PR Summary This pull request implements a new error format and updates the usage of error handling across multiple components. - `logger_hooks.c`: Adds logic to transform client log data and ensure error details are properly set. - `PostgresMongoResultExtensions.cs`: Refactors error handling to include sanitized error hints and details. - `error.rs` and `pg.rs`: Adds support for known PostgreSQL error codes and refines error handling. - `PostgresError.cs` and `PostgresClient.cs`: Updates error properties to include error hints and details. - Multiple files in `pg_helio_core`: Replaces `ERRCODE_INVALID_TEXT_REPRESENTATION` with `ERRCODE_HELIO_BADVALUE` for better error categorization.