Skip to content

Validation: Structured error responses #651

@vprashrex

Description

@vprashrex

Is your feature request related to a problem?
Validation errors are currently returned as a single concatenated string, leading to noisy union errors and incomplete field paths. This makes it difficult for clients to systematically parse and display errors in their platforms.

Describe the solution you'd like

  • Return structured errors in the format [{field, message}]
  • Filter out non-matching union branch errors
  • Include full dotted field paths
Original issue

Describe the current behavior
Validation errors are returned as a single concatenated string with noisy union errors and incomplete field paths.

Describe the enhancement you'd like
Return structured errors [{field, message}], filter non-matching union branch errors, and include full dotted field paths.

Why is this enhancement needed?
Current Error response as so much noice which makes it difficult to track and parse error and would be difficult for the client to systematically show error in their platforms. by structured error response for especially validation it can help the client to parse the error

Additional context
Glific raised the issue:
Image

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions