Files
documentdb/pg_documentdb_gw
Juan Carlos Aguilera Mendez 7761584140 Merged PR 1710287: Handle long index creation error correctly
### 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 -->
2025-07-09 18:56:11 +08:00
..