(response: gloo_net::http::Response, fallback: &str)
| 995 | |
| 996 | #[cfg(all(feature = "local-media", not(feature = "mock")))] |
| 997 | async fn local_media_api_error(response: gloo_net::http::Response, fallback: &str) -> String { |
| 998 | let status = response.status(); |
| 999 | match response.json::<LocalMediaApiErrorResponse>().await { |
| 1000 | Ok(payload) if !payload.error.trim().is_empty() => payload.error, |
| 1001 | _ => format!("{fallback}: HTTP {status}"), |
| 1002 | } |
| 1003 | } |
| 1004 | |
| 1005 | #[cfg(all(feature = "local-media", any(not(feature = "mock"), test)))] |
| 1006 | pub fn build_admin_local_media_upload_tasks_url() -> String { |
no test coverage detected