mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-30 00:03:30 +02:00
added more comments
This commit is contained in:
parent
f7e168de19
commit
f15adde712
1 changed files with 7 additions and 5 deletions
|
@ -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",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue