Skip to main content

sanitize_html_error

Function sanitize_html_error 

Source
pub fn sanitize_html_error(text: &str) -> String
Expand description

Sanitize an HTTP error body: if it looks like an HTML error page (e.g., 502/503 from a reverse proxy), extract the page title instead of dumping the full HTML into the error message.