add: provide more information on psql and redis connection errors
This commit is contained in:
parent
013bc0b45f
commit
22ae479bd7
4 changed files with 23 additions and 9 deletions
|
@ -119,12 +119,13 @@ pub async fn proxy_request(
|
|||
}
|
||||
|
||||
// ...
|
||||
let res = reqwest::get(format!("https://ws.audioscrobbler.com/2.0/{out}"))
|
||||
.await
|
||||
.unwrap()
|
||||
.text()
|
||||
.await
|
||||
.unwrap();
|
||||
let res = match reqwest::get(format!("https://ws.audioscrobbler.com/2.0/{out}")).await {
|
||||
Ok(c) => c,
|
||||
Err(e) => return Json(Error::MiscError(e.to_string()).into()),
|
||||
}
|
||||
.text()
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
Json(ApiReturn {
|
||||
ok: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue