mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-15 17:17:02 +02:00
truncated long domains in error messages; updated error messages
This commit is contained in:
parent
3ff961cdac
commit
e7a3001409
2 changed files with 6 additions and 2 deletions
|
@ -365,7 +365,9 @@ class Domain(TimeStampedModel, DomainHelper):
|
||||||
for addr in ip:
|
for addr in ip:
|
||||||
if not cls._valid_ip_addr(addr):
|
if not cls._valid_ip_addr(addr):
|
||||||
raise NameserverError(
|
raise NameserverError(
|
||||||
code=nsErrorCodes.INVALID_IP, nameserver=nameserver, ip=ip
|
code=nsErrorCodes.INVALID_IP,
|
||||||
|
nameserver=nameserver[:40],
|
||||||
|
ip=ip
|
||||||
)
|
)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,9 @@ class NameserverError(Exception):
|
||||||
NameserverErrorCodes.MISSING_HOST: (
|
NameserverErrorCodes.MISSING_HOST: (
|
||||||
"Name server must be provided to enter IP address."
|
"Name server must be provided to enter IP address."
|
||||||
),
|
),
|
||||||
NameserverErrorCodes.INVALID_HOST: ("Name server, {}, is not valid."),
|
NameserverErrorCodes.INVALID_HOST: (
|
||||||
|
"Enter a name server in the required format, like ns1.example.com"
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, *args, code=None, nameserver=None, ip=None, **kwargs):
|
def __init__(self, *args, code=None, nameserver=None, ip=None, **kwargs):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue