Beeter communication of dns errors

This commit is contained in:
Slatian
2023-08-07 21:09:14 +02:00
parent 2e1f6a77ac
commit 2fe1b69174
4 changed files with 60 additions and 25 deletions

View File

@ -706,7 +706,22 @@ async fn get_dig_result(
used_dns_resolver: dns_resolver_name.clone(),
}
}
} else {
return DigResult {
records: DnsLookupResult{
invalid_name: true,
.. Default::default()
},
.. Default::default()
}
}
} else {
return DigResult {
records: DnsLookupResult{
unkown_resolver: true,
.. Default::default()
},
.. Default::default()
}
}
return Default::default();
}

View File

@ -38,10 +38,12 @@ pub struct DnsLookupResult {
pub txt: Option<Vec<String>>,
pub srv: Option<Vec<SrvRecord>>,
pub caa: Option<Vec<String>>,
pub other_error: bool,
pub dns_error: bool,
pub nxdomain: bool,
pub timeout: bool,
pub other_error: bool,
pub dns_error: bool,
pub nxdomain: bool,
pub timeout: bool,
pub invalid_name: bool,
pub unkown_resolver: bool,
}
#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq)]