]> git.ipfire.org Git - ddns.git/blobdiff - src/ddns/system.py
Handle HTTP error 404 generically
[ddns.git] / src / ddns / system.py
index 79bf19212c04ea08a1fdb80117bbceb5ceee1365..8415579455763369a0a9ac844841ab2ee1f39945 100644 (file)
@@ -180,6 +180,12 @@ class DDNSSystem(object):
                        elif e.code in (401, 403):
                                raise DDNSAuthenticationError(e.reason)
 
+                       # 404 - Not found
+                       # Either the provider has changed the API, or
+                       # there is an error on the server
+                       elif e.code == 404:
+                               raise DDNSNotFound(e.reason)
+
                        # 500 - Internal Server Error
                        elif e.code == 500:
                                raise DDNSInternalServerError(e.reason)