From 3657ad769a2ff5eb8a961ecf1b85be89d7604e4f Mon Sep 17 00:00:00 2001
From: Ferenc Schulcz <schulcz.ferenc@gmail.com>
Date: Fri, 21 Feb 2025 21:50:18 +0100
Subject: [PATCH] Further elaborate error messages

---
 dyndns.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/dyndns.py b/dyndns.py
index e55f535..4573d8a 100644
--- a/dyndns.py
+++ b/dyndns.py
@@ -72,7 +72,10 @@ def dyndnsRegister(**kwargs):
     for s in registrationStatuses:
         if s[1] > 299:
             allSuccess = False
-            print(f"Dyndns registration error: {s[0]} was unreachable.")
+            if s[1] == 600:
+                print(f"Dyndns registration error: {s[0]} was unreachable.")
+            else:
+                print(f"Dyndns registration error: {s[0]} gave HTTP code {s[1]}.")
         else:
             allFail = False
     if allFail:
@@ -104,7 +107,10 @@ def dyndnsUpdate(**kwargs):
     for s in updateStatuses:
         if s[1] > 299:
             allSuccess = False
-            print(f"Dyndns update error: {s[0]} was not reachable.")
+            if s[1] == 600:
+                print(f"Dyndns update error: {s[0]} was not reachable.")
+            else:
+                print(f"Dyndns update error: {s[0]} gave HTTP code {s[1]}.")
         else:
             allFail = False
     if allFail:
-- 
GitLab