fix(Nextcloud): Catch SSLEOFError when fetching notifications
All checks were successful
Mirror to Forgejo / mirror-to-codeberg (push) Successful in 4s
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:
parent
73c47dcfc9
commit
5a4b30f768
1 changed files with 7 additions and 4 deletions
|
@ -186,10 +186,13 @@ def main():
|
|||
}
|
||||
while True:
|
||||
log.debug("Fetching notifications.")
|
||||
response = requests.get(
|
||||
f"{config["nextcloud_base_url"]}{config["nextcloud_notification_path"]}",
|
||||
headers=nextcloud_request_headers,
|
||||
)
|
||||
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}."
|
||||
|
|
Loading…
Reference in a new issue