Skip to content

Commit c90ea80

Browse files
Merge pull request #240 from pascalbreuninger/main
fix(ui): don't show error modal for custom protocol messages if host …
2 parents 83ff1a7 + aaac352 commit c90ea80

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

desktop/src-tauri/src/custom_protocol.rs

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,26 @@ impl CustomProtocol {
7979
);
8080
};
8181
}
82-
Err(err) => {
83-
if let Err(err) = app_state
84-
.ui_messages
85-
.send(UiMessage::OpenWorkspaceFailed(err))
86-
.await
87-
{
82+
Err(err) => match err {
83+
ParseError::UnsupportedHost(host) => {
8884
error!(
89-
"Failed to broadcast invalid custom protocol message: {:?}, {}",
90-
err.0, err
85+
"Attempted to open custom url with unsupported host: {}",
86+
host
9187
);
92-
};
93-
}
88+
}
89+
_ => {
90+
if let Err(err) = app_state
91+
.ui_messages
92+
.send(UiMessage::OpenWorkspaceFailed(err))
93+
.await
94+
{
95+
error!(
96+
"Failed to broadcast invalid custom protocol message: {:?}, {}",
97+
err.0, err
98+
);
99+
};
100+
}
101+
},
94102
}
95103
})
96104
})

0 commit comments

Comments
 (0)