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