Summary
Part of #79.
Validation-error responses have two different shapes depending on entry point:
- Plain REST CRUD writes (
client.crud(path).create()/update()): HTTP 422 with an ErrorResult body (RestApiExceptionHandler.handleValidationError).
- Action-framework path (
SaveRemoteAction/SaveFlowRemoteAction via ApplicationMetadataController.executeAction): HTTP 406 wrapped inside an ActionExecutionResponse.
Problem
This was flagged as a latent bug to reconcile before shipping Phase 4 CRUD parity actions, but Phase 4 shipped without addressing it (documented as an explicit open item in the d03b14c5 commit message). Now that SaveRemoteAction exists side by side with plain REST CRUD for the same entity, the same frontend form can hit either shape depending on which path an app wires up — this is a live inconsistency, not a hypothetical one anymore.
Proposed work
- Pick one shape (422/
ErrorResult is the more idiomatic REST convention; the Action-framework's 406/ActionExecutionResponse is more consistent with every other action response).
- Migrate the other entry point to match, or make
ActionExecutionResponse carry an ErrorResult-compatible validation payload if 406 is kept for other reasons.
- Update SDK error handling (
DynamiaApiError) and any Vue-side form error rendering that currently only understands one shape.
References
RestApiExceptionHandler.handleValidationError
ApplicationMetadataController.executeAction
docs/design/SERVER_DRIVEN_ACTION_FLOWS.md §7.6 point 3, §9
Summary
Part of #79.
Validation-error responses have two different shapes depending on entry point:
client.crud(path).create()/update()): HTTP 422 with anErrorResultbody (RestApiExceptionHandler.handleValidationError).SaveRemoteAction/SaveFlowRemoteActionviaApplicationMetadataController.executeAction): HTTP 406 wrapped inside anActionExecutionResponse.Problem
This was flagged as a latent bug to reconcile before shipping Phase 4 CRUD parity actions, but Phase 4 shipped without addressing it (documented as an explicit open item in the
d03b14c5commit message). Now thatSaveRemoteActionexists side by side with plain REST CRUD for the same entity, the same frontend form can hit either shape depending on which path an app wires up — this is a live inconsistency, not a hypothetical one anymore.Proposed work
ErrorResultis the more idiomatic REST convention; the Action-framework's 406/ActionExecutionResponseis more consistent with every other action response).ActionExecutionResponsecarry anErrorResult-compatible validation payload if 406 is kept for other reasons.DynamiaApiError) and any Vue-side form error rendering that currently only understands one shape.References
RestApiExceptionHandler.handleValidationErrorApplicationMetadataController.executeActiondocs/design/SERVER_DRIVEN_ACTION_FLOWS.md§7.6 point 3, §9