Skip to main content

render_error

Function render_error 

Source
pub fn render_error(code: u16, message: &str) -> Option<String>
Expand description

A single 5xx status line. None for a code outside ERROR_CODES.

An empty message takes RFC 2229’s own text for the code. The message is one line, so control characters become spaces, and it is cut to 900 characters so the line stays well inside MAX_LINE_BYTES.