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

To generate error JSON string for HTTP body.