diff --git a/src/main.rs b/src/main.rs index fcfd047..32f8c38 100644 --- a/src/main.rs +++ b/src/main.rs @@ -264,6 +264,22 @@ async fn handle_run(conf: Config, run: Run) -> Result<()> { cache_file.0.insert(record.id, addr); 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) -> Result { #[derive(Deserialize, Debug)] #[allow(dead_code)] struct Message { - code: u16, + code: u32, message: String, }