Skip to content

Conversation

@samyuktaprabhu
Copy link
Contributor

@samyuktaprabhu samyuktaprabhu commented Jan 12, 2026

PR: Enforce String length contract in CDS to prevent DB 500 errors

Previously, oversized String values relied on database defaults for validation (255 on SQLite/Postgres, 5000 on HANA), which caused DB constraint violations and HTTP 500 errors and also showed 'Error Executing the statement' without proper error message being displayed.

This PR has a change in CDS so that CAP validates input at the service boundary and returns a proper 400 Bad Request instead of leaking database errors. This follows a contract-first design and ensures consistent behavior across all databases.

@samyuktaprabhu samyuktaprabhu force-pushed the sam-397-error-message-note branch from 79ab474 to f170046 Compare January 12, 2026 13:47
@samyuktaprabhu samyuktaprabhu marked this pull request as ready for review January 12, 2026 13:47
@samyuktaprabhu samyuktaprabhu force-pushed the sam-397-error-message-note branch from 425a03f to b0f4f84 Compare January 15, 2026 10:31
@samyuktaprabhu samyuktaprabhu merged commit 8ac8b60 into main Jan 15, 2026
10 checks passed
@samyuktaprabhu samyuktaprabhu deleted the sam-397-error-message-note branch January 15, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants