(status: u16)
| 1224 | } |
| 1225 | |
| 1226 | fn status_text(status: u16) -> &'static str { |
| 1227 | match status { |
| 1228 | 202 => "Accepted", |
| 1229 | 400 => "Bad Request", |
| 1230 | 404 => "Not Found", |
| 1231 | 500 => "Internal Server Error", |
| 1232 | 502 => "Bad Gateway", |
| 1233 | 503 => "Service Unavailable", |
| 1234 | _ => "OK", |
| 1235 | } |
| 1236 | } |
| 1237 | |
| 1238 | fn error_payload(error: &str, detail: String) -> serde_json::Value { |
| 1239 | serde_json::json!({ |
nothing calls this directly
no outgoing calls
no test coverage detected