Serde icon indicating copy to clipboard operation
Serde copied to clipboard

Field path on deserialization error

Open repli2dev opened this issue 1 year ago • 3 comments

When error occures during deserialization the field path could be present to use in API error response.

Detailed description and context

For programmer centric experience when using deserialization as a part of API endpoint validation the resulting error should contain a field path and basic error description and error type to be passed back to the caller, so that he can react and solve the issue.

(Or to be unified with like symfony validator and on UI level shown to fields of the form.)

Possible implementation

N/A

Your environment

  • PHP 8.1
  • Using together with symfony validator for logical (business) validation.

repli2dev avatar Jan 30 '23 09:01 repli2dev