GRUD_DEV-1233/fix-internal-error-with-multilang-value#328
Conversation
for mismatch of value and column types
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR addresses an internal error scenario when row values don’t match a column’s language/value shape (single-language vs multi-language), and adds regression tests to ensure the API returns a proper validation error instead of failing unexpectedly.
Changes:
- Add validation to reject multilanguage JSON objects for single-language columns and improve type validation errors for several simple column types.
- Broaden text-type validation to accept numeric inputs (converted to string) and add explicit error messages for invalid types.
- Add tests covering mismatched multilanguage/single-language values and invalid numeric column values.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/test/scala/com/campudus/tableaux/api/content/CreateTest.scala | Adds new regression tests for invalid row value shapes/types and refactors column-json helpers used by tests. |
| src/main/scala/com/campudus/tableaux/database/domain/column.scala | Tightens (and in one case broadens) value validation for simple columns, adding explicit IllegalArgumentException messages for invalid inputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against d99d70c |
Test Results1 182 tests +6 1 174 ✅ +6 4m 13s ⏱️ +10s Results for commit d99d70c. ± Comparison against base commit 7ad437c. This pull request removes 1 and adds 7 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
but no implicit conversion from number/integer to any text value
Submit a pull request
Related Ticket: GRUD_DEV-1233
Please make sure the following is true
Other information/comments (e.g. reasons why points are not checked from above)
Reason for this PR