feat: adjust clash info parsing logs

This commit is contained in:
GyDi
2022-08-15 20:21:43 +08:00
committed by GitHub
parent fa65f606b8
commit 7f321c89cb
4 changed files with 56 additions and 182 deletions

View File

@@ -196,10 +196,11 @@ impl Service {
/// get clash client url and headers from clash info
fn clash_client_info(info: ClashInfo) -> Result<(String, HeaderMap)> {
if info.server.is_none() {
let status = &info.status;
if info.port.is_none() {
bail!("failed to parse config.yaml file");
bail!("failed to parse config.yaml file with status {status}");
} else {
bail!("failed to parse the server");
bail!("failed to parse the server with status {status}");
}
}