added more comments

This commit is contained in:
Alysia Broddrick 2023-10-04 18:05:51 -07:00
parent f7e168de19
commit f15adde712
No known key found for this signature in database
GPG key ID: 03917052CD0F06B7

View file

@ -5,7 +5,11 @@ class NameserverErrorCodes(IntEnum):
"""Used in the NameserverError class for """Used in the NameserverError class for
error mapping. error mapping.
Overview of nameserver error codes: Overview of nameserver error codes:
- - 1 MISSING_IP ip address is missing for a nameserver
- 2 GLUE_RECORD_NOT_ALLOWED a host has a nameserver
value but is not a subdomain
- 3 INVALID_IP invalid ip address format or invalid version
- 4 TOO_MANY_HOSTS more than the max allowed host values
""" """
MISSING_IP = 1 MISSING_IP = 1
@ -16,12 +20,10 @@ class NameserverErrorCodes(IntEnum):
class NameserverError(Exception): class NameserverError(Exception):
""" """
Overview of contact error codes: NameserverError class used when to raise exceptions on
the nameserver getter
""" """
# For linter
_error_mapping = { _error_mapping = {
NameserverErrorCodes.MISSING_IP: "Nameserver {} needs to have an " NameserverErrorCodes.MISSING_IP: "Nameserver {} needs to have an "
"IP address because it is a subdomain", "IP address because it is a subdomain",