Improve error reporting

This commit is contained in:
Ian Renton
2026-07-25 09:02:57 +01:00
parent c397009ada
commit 374a326874
17 changed files with 101 additions and 71 deletions
+10 -2
View File
@@ -153,6 +153,8 @@ class LookupHelper:
logging.warning(f"HTTP {response.status_code} when downloading Country-files.com cty.plist.")
return False
except ConnectionError:
logging.warning(f"Connection error when downloading Clublog cty.xml.")
except Exception as e:
logging.error("Exception when downloading Clublog cty.xml", e)
return False
@@ -175,6 +177,8 @@ class LookupHelper:
logging.warning(f"HTTP {response.status_code} when downloading dxcc.json.")
return False
except ConnectionError:
logging.warning(f"Connection error when downloading dxcc.json.")
except Exception as e:
logging.error("Exception when downloading dxcc.json", e)
return False
@@ -519,8 +523,10 @@ class LookupHelper:
except (KeyError, ValueError):
continue
except ConnectionError:
logging.warning(f"Connection error when looking up callsign %s using QRZ", lookup_call)
except Exception:
logging.error("Exception when looking up QRZ data")
logging.error("Exception when looking up callsign %s using QRZ", lookup_call)
return None
# Not found in QRZ; cache None so we don't keep retrying
@@ -578,8 +584,10 @@ class LookupHelper:
except (KeyError, ValueError):
continue
except ConnectionError:
logging.warning(f"Connection error when looking up callsign %s using HamQTH", lookup_call)
except Exception:
logging.error("Exception when looking up HamQTH data")
logging.error("Exception when looking up callsign %s using HamQTH", lookup_call)
return None
# Not found in HamQTH; cache None so we don't keep retrying