diff --git a/desktop/src-tauri/database/src/platform.rs b/desktop/src-tauri/database/src/platform.rs
index ce0b5664..bd3721d3 100644
--- a/desktop/src-tauri/database/src/platform.rs
+++ b/desktop/src-tauri/database/src/platform.rs
@@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize};
pub enum Platform {
Windows,
Linux,
+ #[allow(non_camel_case_types)]
macOS,
}
diff --git a/desktop/src-tauri/games/src/downloads/download_logic.rs b/desktop/src-tauri/games/src/downloads/download_logic.rs
index 09922ac3..d5d650b5 100644
--- a/desktop/src-tauri/games/src/downloads/download_logic.rs
+++ b/desktop/src-tauri/games/src/downloads/download_logic.rs
@@ -231,7 +231,8 @@ pub fn download_game_bucket(
return Err(ApplicationDownloadError::DownloadError(
RemoteAccessError::InvalidResponse(DropServerError {
status_code: 400,
- status_message: format!(
+ status_message: "Server Error".to_owned(),
+ message: format!(
"invalid number of Content-Lengths recieved: {i}, {lengths}"
),
}),
@@ -245,7 +246,8 @@ pub fn download_game_bucket(
return Err(ApplicationDownloadError::DownloadError(
RemoteAccessError::InvalidResponse(DropServerError {
status_code: 400,
- status_message: format!(
+ status_message: "Server Error".to_owned(),
+ message: format!(
"for {}, expected {}, got {} ({})",
drop.filename, drop.length, raw_length, length
),
diff --git a/desktop/src-tauri/remote/src/auth.rs b/desktop/src-tauri/remote/src/auth.rs
index 9f1ab987..bb41ed0f 100644
--- a/desktop/src-tauri/remote/src/auth.rs
+++ b/desktop/src-tauri/remote/src/auth.rs
@@ -80,7 +80,7 @@ pub async fn fetch_user() -> Result {
let err: DropServerError = response.json().await?;
warn!("{err:?}");
- if err.status_message == "Nonce expired" {
+ if err.message == "Nonce expired" {
return Err(RemoteAccessError::OutOfSync);
}
@@ -106,8 +106,8 @@ pub fn auth_initiate_logic(mode: String) -> Result {
name: format!("{} (Desktop)", hostname.display()),
platform: env::consts::OS.to_string(),
capabilities: HashMap::from([
- ("peerAPI".to_owned(), CapabilityConfiguration {}),
- ("cloudSaves".to_owned(), CapabilityConfiguration {}),
+ ("PeerAPI".to_owned(), CapabilityConfiguration {}),
+ ("CloudSaves".to_owned(), CapabilityConfiguration {}),
]),
mode,
};
@@ -117,9 +117,9 @@ pub fn auth_initiate_logic(mode: String) -> Result {
if response.status() != 200 {
let data: DropServerError = response.json()?;
- error!("could not start handshake: {}", data.status_message);
+ error!("could not start handshake: {:?}", data);
- return Err(RemoteAccessError::HandshakeFailed(data.status_message));
+ return Err(RemoteAccessError::HandshakeFailed(data.message));
}
let response = response.text()?;
diff --git a/desktop/src-tauri/remote/src/error.rs b/desktop/src-tauri/remote/src/error.rs
index a939d616..be42b360 100644
--- a/desktop/src-tauri/remote/src/error.rs
+++ b/desktop/src-tauri/remote/src/error.rs
@@ -15,7 +15,7 @@ use serde::Deserialize;
pub struct DropServerError {
pub status_code: usize,
pub status_message: String,
- // pub message: String,
+ pub message: String,
// pub url: String,
}
@@ -76,7 +76,7 @@ impl Display for RemoteAccessError {
RemoteAccessError::InvalidResponse(error) => write!(
f,
"server returned an invalid response: {}, {}",
- error.status_code, error.status_message
+ error.status_code, error.message
),
RemoteAccessError::UnparseableResponse(error) => {
write!(f, "server returned an invalid response: {error}")
diff --git a/desktop/src-tauri/src/games.rs b/desktop/src-tauri/src/games.rs
index cd726667..ba4f2796 100644
--- a/desktop/src-tauri/src/games.rs
+++ b/desktop/src-tauri/src/games.rs
@@ -6,7 +6,7 @@ use games::{
library::{FetchGameStruct, FrontendGameOptions, Game, get_current_meta, uninstall_game_logic},
state::{GameStatusManager, GameStatusWithTransient},
};
-use log::warn;
+use log::{info, warn};
use process::PROCESS_MANAGER;
use remote::{
auth::generate_authorization_header,
@@ -55,7 +55,8 @@ pub async fn fetch_library_logic(
if response.status() != 200 {
let err = response.json().await.unwrap_or(DropServerError {
status_code: 500,
- status_message: "Invalid response from server.".to_owned(),
+ status_message: "Server Error".to_owned(),
+ message: "Invalid response from server.".to_owned(),
});
warn!("{err:?}");
return Err(RemoteAccessError::InvalidResponse(err));
@@ -223,6 +224,11 @@ pub async fn fetch_game_version_options_logic(
return Err(RemoteAccessError::InvalidResponse(err));
}
+ let raw = response.text().await?;
+ info!("{}", raw);
+
+ return Err(RemoteAccessError::CorruptedState);
+
let data: Vec = response.json().await?;
let state_lock = state.lock();