From c5989d27358855925322832b3fafbaed234a68f7 Mon Sep 17 00:00:00 2001 From: lucidhz <38235555+lucidhz@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:27:12 +0800 Subject: [PATCH] fix: put_configs response add detail error message (#2492) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 感谢pr --- src-tauri/src/core/clash_api.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/core/clash_api.rs b/src-tauri/src/core/clash_api.rs index 68282599..60af1204 100644 --- a/src-tauri/src/core/clash_api.rs +++ b/src-tauri/src/core/clash_api.rs @@ -27,7 +27,9 @@ pub async fn put_configs(path: &str) -> Result<()> { match response.status().as_u16() { 204 => Ok(()), status => { - bail!("failed to put configs with status \"{status}\"") + let body = response.text().await?; + // print!("failed to put configs with status \"{}\"\n{}\n{}", status, url, body); + bail!("failed to put configs with status \"{status}\"\n{url}\n{body}"); } } }