Better error message
Some checks failed
Cargo CI / Build and Test (pull_request) Failing after 1m57s
Cargo CI / Lint (pull_request) Failing after 1m4s

This commit is contained in:
Wojciech Kozlowski 2024-08-26 19:37:11 +02:00
parent 1578a1d1f8
commit 59b675562d

View File

@ -94,8 +94,11 @@ impl<MH: IMusicHoard> IAppInteractBrowse for AppMachine<MH, AppBrowse> {
let client = match MusicBrainzApiClient::new(MUSICHOARD_TUI_HTTP_USER_AGENT) { let client = match MusicBrainzApiClient::new(MUSICHOARD_TUI_HTTP_USER_AGENT) {
Ok(client) => client, Ok(client) => client,
Err(err) => { Err(err) => {
return AppMachine::error(self.inner, format!("cannot fetch: {}", err.to_string())) return AppMachine::error(
.into() self.inner,
format!("cannot fetch: HTTP client init failed: {}", err.to_string()),
)
.into()
} }
}; };
let mut api = MusicBrainzApi::new(client); let mut api = MusicBrainzApi::new(client);