Print update error messages
This commit is contained in:
parent
ae5a5b84b9
commit
23ceeffcfa
1 changed files with 17 additions and 1 deletions
18
src/main.rs
18
src/main.rs
|
@ -264,6 +264,22 @@ async fn handle_run(conf: Config, run: Run) -> Result<()> {
|
||||||
cache_file.0.insert(record.id, addr);
|
cache_file.0.insert(record.id, addr);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for message in resp.messages {
|
||||||
|
info!(
|
||||||
|
code = message.code,
|
||||||
|
message = message.message,
|
||||||
|
"Cloudflare API returned message"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
for error in resp.errors {
|
||||||
|
warn!(
|
||||||
|
code = error.code,
|
||||||
|
message = error.message,
|
||||||
|
"Cloudflare API returned error"
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,7 +328,7 @@ fn ip_cache_path(cache_dir: Option<PathBuf>) -> Result<PathBuf> {
|
||||||
#[derive(Deserialize, Debug)]
|
#[derive(Deserialize, Debug)]
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
struct Message {
|
struct Message {
|
||||||
code: u16,
|
code: u32,
|
||||||
message: String,
|
message: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue