fix(Nextcloud): Catch SSLEOFError when fetching notifications
All checks were successful
Mirror to Forgejo / mirror-to-codeberg (push) Successful in 4s

This happened while the server was down for maintenance. We can most
likely just ignore it.

Fixes: #7
This commit is contained in:
Jiří Štefka 2025-01-16 15:54:33 +01:00
parent 73c47dcfc9
commit 5a4b30f768
Signed by: jiriks74
GPG key ID: 1D5E30D3DB2264DE

View file

@ -186,10 +186,13 @@ def main():
}
while True:
log.debug("Fetching notifications.")
try:
response = requests.get(
f"{config["nextcloud_base_url"]}{config["nextcloud_notification_path"]}",
headers=nextcloud_request_headers,
)
except requests.exceptions.SSLError as e:
log.error(f"SSL error fetching notifications. Maybe the server/proxy is down?\n{e}")
if not response.ok:
log.error(
f"Error while fetching notifications. Response code: {response.status_code}."