Skip to content

Commit

Permalink
fix: wrong error message on exception in fetch taxonomy
Browse files Browse the repository at this point in the history
this is not necessarily a timeout, and currently we don't know which error happens
  • Loading branch information
alexgarel committed Mar 24, 2022
1 parent bbf2749 commit 5b9252d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions robotoff/taxonomy.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ def fetch_taxonomy(url: str, fallback_path: str, offline=False) -> Optional[Taxo
try:
r = http_session.get(url, timeout=120) # might take some time
data = r.json()
except Exception:
logger.warning("Timeout while fetching taxonomy at %s", url)
except Exception as e:
logger.exception(f"{type(e)} exception while fetching taxonomy at %s", url)
if fallback_path:
return Taxonomy.from_json(fallback_path)
else:
Expand Down

0 comments on commit 5b9252d

Please sign in to comment.