]> git.ipfire.org Git - people/ms/ddns.git/blobdiff - src/ddns/errors.py
Catch "no route to host" errors
[people/ms/ddns.git] / src / ddns / errors.py
index fac3890dbdcb72d31094d9a188de75ae4624593e..26bc18ec46d508c02bbd6836d3cce18495e79bd5 100644 (file)
@@ -109,6 +109,20 @@ class DDNSNetworkUnreachableError(DDNSNetworkError):
        reason = N_("Network unreachable")
 
 
+class DDNSNoRouteToHostError(DDNSNetworkError):
+       """
+               Thrown when there is no route to a host.
+       """
+       reason = N_("No route to host")
+
+
+class DDNSNotFound(DDNSError):
+       """
+               Thrown when the called URL has not been found
+       """
+       reason = N_("Not found")
+
+
 class DDNSRequestError(DDNSError):
        """
                Thrown when a request could
@@ -117,6 +131,14 @@ class DDNSRequestError(DDNSError):
        reason = N_("Request error")
 
 
+class DDNSResolveError(DDNSNetworkError):
+       """
+               Thrown when a DNS record could not be resolved
+               because of a local error.
+       """
+       reason = N_("Could not resolve DNS entry")
+
+
 class DDNSServiceUnavailableError(DDNSNetworkError):
        """
                Equivalent to HTTP error code 503.