do not log error when search timeout
This commit is contained in:
parent
10df21d0ec
commit
dec9c5f95c
7 changed files with 14 additions and 0 deletions
|
@ -65,6 +65,8 @@ class ApplePodcast(AbstractSite):
|
|||
p["artworkUrl600"],
|
||||
)
|
||||
)
|
||||
except httpx.ReadTimeout:
|
||||
logger.warning("ApplePodcast search timeout", extra={"query": q})
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
"ApplePodcast search error", extra={"query": q, "exception": e}
|
||||
|
|
|
@ -142,6 +142,8 @@ class Bandcamp(AbstractSite):
|
|||
cover,
|
||||
)
|
||||
)
|
||||
except httpx.ReadTimeout:
|
||||
logger.warning("Bandcamp search timeout", extra={"query": q})
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
"Bandcamp search error", extra={"query": q, "exception": e}
|
||||
|
|
|
@ -163,6 +163,8 @@ class Bangumi(AbstractSite):
|
|||
cover_url=s["images"].get("common"),
|
||||
)
|
||||
)
|
||||
except httpx.ReadTimeout:
|
||||
logger.warning("Bangumi search timeout", extra={"query": q})
|
||||
except Exception as e:
|
||||
logger.error("Bangumi search error", extra={"query": q, "exception": e})
|
||||
return results
|
||||
|
|
|
@ -190,6 +190,8 @@ class Goodreads(AbstractSite):
|
|||
cover,
|
||||
)
|
||||
)
|
||||
except httpx.ReadTimeout:
|
||||
logger.warning("Goodreads search timeout", extra={"query": q})
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
"Goodreads search error", extra={"query": q, "exception": e}
|
||||
|
|
|
@ -164,6 +164,8 @@ class GoogleBooks(AbstractSite):
|
|||
cover,
|
||||
)
|
||||
)
|
||||
except httpx.ReadTimeout:
|
||||
logger.warning("GoogleBooks search timeout", extra={"query": q})
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
"GoogleBooks search error", extra={"query": q, "exception": e}
|
||||
|
|
|
@ -143,6 +143,8 @@ class Spotify(AbstractSite):
|
|||
)
|
||||
else:
|
||||
logger.warning(f"Spotify search '{q}' no results found.")
|
||||
except httpx.ReadTimeout:
|
||||
logger.warning("Spotify search timeout", extra={"query": q})
|
||||
except Exception as e:
|
||||
logger.error("Spotify search error", extra={"query": q, "exception": e})
|
||||
return results
|
||||
|
|
|
@ -222,6 +222,8 @@ class TMDB_Movie(AbstractSite):
|
|||
)
|
||||
else:
|
||||
logger.warning(f"TMDB search '{q}' no results found.")
|
||||
except httpx.ReadTimeout:
|
||||
logger.warning("TMDb search timeout", extra={"query": q})
|
||||
except Exception as e:
|
||||
logger.error("TMDb search error", extra={"query": q, "exception": e})
|
||||
return results[offset : offset + page_size]
|
||||
|
|
Loading…
Add table
Reference in a new issue