@smbcloud / cli / commits / 46c533e

Refactor login error handling to use map_err for clarity

keypair34 committed Apr 12, 2026 at 07:54 UTC 46c533ec8ad3b64799d3285ba210ca71c62c6365
1 file changed +4 -4
crates/smbcloud-network/src/network.rs
+4 -4
@@ -206,12 +206,12 @@ pub async fn request_login(builder: RequestBuilder) -> Result<AccountStatus, Err
206 message: error_code.to_string(),
207 })
208 }
209 - (status, _) => parse_error_response(response).await.or_else(|_| {
210 - Err(ErrorResponse::Error {
209 + (status, _) => parse_error_response(response)
210 + .await
211 + .map_err(|_| ErrorResponse::Error {
212 error_code: ErrorCode::NetworkError,
213 message: format!("Unexpected login response status: {}", status),
213 - })
214 - }),
214 + }),
215 }
216 }
217