pub fn emit_decompress_error(
encoding: &str,
error: Error,
max_decompressed_size: usize,
) -> ErrorMessageExpand description
Maps a decompression failure to a response. If error is a DecompressedSizeLimitExceeded
(the decompressed output exceeded the configured size cap), it becomes a 413 Payload Too Large reporting max_decompressed_size (the cap that was actually enforced), matching the
request-body and snappy size errors. Any other decode failure emits an HttpDecompressError
event and becomes a 422 Unprocessable Entity.
Callers whose error is not already an std::io::Error (e.g. snappy) wrap it via
std::io::Error::other.