mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-21 02:06:03 +02:00
up log level
This commit is contained in:
parent
8b473d5e18
commit
3dbafb5220
4 changed files with 5 additions and 4 deletions
|
@ -20,7 +20,7 @@ applications:
|
|||
# Tell Django where it is being hosted
|
||||
DJANGO_BASE_URL: https://getgov-ms.app.cloud.gov
|
||||
# Tell Django how much stuff to log
|
||||
DJANGO_LOG_LEVEL: INFO
|
||||
DJANGO_LOG_LEVEL: DEBUG
|
||||
# default public site location
|
||||
GETGOV_PUBLIC_SITE_URL: https://get.gov
|
||||
# Flag to disable/enable features in prod environments
|
||||
|
|
|
@ -62,10 +62,10 @@ class RegistryError(Exception):
|
|||
- 2501 - 2502 Something malicious or abusive may have occurred
|
||||
"""
|
||||
|
||||
def __init__(self, *args, code=None, msg=None,**kwargs):
|
||||
def __init__(self, *args, code=None, note=None,**kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.code = code
|
||||
self.msg = msg
|
||||
self.note = note
|
||||
|
||||
def should_retry(self):
|
||||
return self.code == ErrorCode.COMMAND_FAILED
|
||||
|
|
|
@ -2916,6 +2916,7 @@ class DomainAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
|||
except RegistryError as err:
|
||||
# Using variables to get past the linter
|
||||
message1 = f"Cannot delete Domain when in state {obj.state}"
|
||||
message2 = f"This subdomain is being used as a hostname on another domain: {err.note}"
|
||||
# Human-readable mappings of ErrorCodes. Can be expanded.
|
||||
error_messages = {
|
||||
# noqa on these items as black wants to reformat to an invalid length
|
||||
|
|
|
@ -1066,8 +1066,8 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
if host.domain != self:
|
||||
logger.error("Host %s in use by another domain: %s", host.name, host.domain)
|
||||
raise RegistryError(
|
||||
msg="Host in use by another domain: {}".format(host.domain),
|
||||
code=ErrorCode.OBJECT_ASSOCIATION_PROHIBITS_OPERATION,
|
||||
note=host.domain,
|
||||
)
|
||||
|
||||
nameservers = [n[0] for n in self.nameservers]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue