From 0f526fce6cdb664a6f689c334cc0fb9924666c95 Mon Sep 17 00:00:00 2001 From: fufesou <13586388+fufesou@users.noreply.github.com> Date: Thu, 4 Sep 2025 15:04:53 +0800 Subject: [PATCH] refact: http, rust side, log errror (#12820) Signed-off-by: fufesou --- src/hbbs_http/account.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/hbbs_http/account.rs b/src/hbbs_http/account.rs index 8d4eb28b1..5cf223a49 100644 --- a/src/hbbs_http/account.rs +++ b/src/hbbs_http/account.rs @@ -148,7 +148,7 @@ impl OidcSession { id: &str, uuid: &str, ) -> ResultType> { - Ok(OIDC_SESSION + let resp = OIDC_SESSION .read() .unwrap() .client @@ -159,8 +159,14 @@ impl OidcSession { "uuid": uuid, "deviceInfo": crate::ui_interface::get_login_device_info(), })) - .send()? - .try_into()?) + .send()?; + let status = resp.status(); + match resp.try_into() { + Ok(v) => Ok(v), + Err(err) => { + hbb_common::bail!("Http status: {}, err: {}", status, err); + } + } } fn query(