cave/feed: report url_host() errors
This commit is contained in:
parent
b0d63aad28
commit
221c4a7fb2
|
@ -5,6 +5,7 @@ use eventsource_stream::Eventsource;
|
|||
|
||||
pub fn url_host(url: &str) -> Option<String> {
|
||||
reqwest::Url::parse(url)
|
||||
.map_err(|e| tracing::warn!("Cannot parse url {:?}: {}", url, e))
|
||||
.ok()
|
||||
.and_then(|url| url.domain()
|
||||
.map(|host| host.to_lowercase())
|
||||
|
|
Loading…
Reference in New Issue