fix(download manager): fix incorrect error assumptions & update types

This commit is contained in:
DecDuck
2024-12-31 00:08:05 +11:00
parent 472eb1d435
commit a17311a88d
6 changed files with 31 additions and 22 deletions

View File

@ -93,7 +93,9 @@ fn recieve_handshake_logic(app: &AppHandle, path: String) -> Result<(), RemoteAc
let path_chunks: Vec<&str> = path.split("/").collect();
if path_chunks.len() != 3 {
app.emit("auth/failed", ()).unwrap();
return Err(RemoteAccessError::InvalidResponse);
return Err(RemoteAccessError::HandshakeFailed(
"failed to parse token".to_string(),
));
}
let base_url = {