pub fn format_error(id: &str, code: &str, message: &str) -> String
Format an error response as JSON string (newline-terminated).