mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 19:59:54 -05:00
### Does this PR have any customer impact? ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) ### Are you introducing any new config? If yes, do you have tests with and without them being set? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description One NodeJS test cases was failing when running against the rust GW since we were not handling the case where the index is too long. ---- #### AI description (iteration 1) #### PR Classification Bug fix addressing error handling during index creation. #### PR Summary The pull request improves how over-sized index creation errors are handled by introducing explicit checks and returning a clearer error message. - In `src/responses/pg.rs`: Added a conditional branch that detects when the error message contains "index row size" and "exceeds maximum" to return a specific error code with the message "Index key is too large." - In `src/error.rs`: Introduced a new error variant `CannotBuildIndexKeys` with code 201 to support the enhanced error handling. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->