Skip to main content

body_error

Function body_error 

Source
pub fn body_error(error: Error) -> Error
Expand description

Convert a JSON body deserialization failure into a field-level 400.

serde_json reports the offending field for the common cases; those become errors.<field> entries, and everything else is reported at the body level under the empty key — the same convention ASP.NET Core uses for a body model that cannot be bound at all.