Skip to main content

parse_body

Function parse_body 

Source
pub(crate) fn parse_body<T: DeserializeOwned>(
    body: &Bytes,
) -> Result<T, ApiError>
Expand description

Parses a JSON body, mapping any failure to a 400 in the atproto shape.

axum::Json is not used as an extractor here because its rejection is axum’s own plain-text body, not {"error":..,"message":..}.