mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-28 13:36:30 +02:00
more debugging
This commit is contained in:
parent
3dbafb5220
commit
a9710dafde
3 changed files with 3 additions and 2 deletions
|
@ -65,6 +65,7 @@ class RegistryError(Exception):
|
||||||
def __init__(self, *args, code=None, note=None,**kwargs):
|
def __init__(self, *args, code=None, note=None,**kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.code = code
|
self.code = code
|
||||||
|
# note is a string that can be used to provide additional context
|
||||||
self.note = note
|
self.note = note
|
||||||
|
|
||||||
def should_retry(self):
|
def should_retry(self):
|
||||||
|
|
|
@ -2921,7 +2921,7 @@ class DomainAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
||||||
error_messages = {
|
error_messages = {
|
||||||
# noqa on these items as black wants to reformat to an invalid length
|
# noqa on these items as black wants to reformat to an invalid length
|
||||||
ErrorCode.OBJECT_STATUS_PROHIBITS_OPERATION: message1,
|
ErrorCode.OBJECT_STATUS_PROHIBITS_OPERATION: message1,
|
||||||
ErrorCode.OBJECT_ASSOCIATION_PROHIBITS_OPERATION: err.msg,
|
ErrorCode.OBJECT_ASSOCIATION_PROHIBITS_OPERATION: message2,
|
||||||
}
|
}
|
||||||
|
|
||||||
message = "Cannot connect to the registry"
|
message = "Cannot connect to the registry"
|
||||||
|
|
|
@ -1505,7 +1505,7 @@ class Domain(TimeStampedModel, DomainHelper):
|
||||||
self.deleted = timezone.now()
|
self.deleted = timezone.now()
|
||||||
self.expiration_date = None
|
self.expiration_date = None
|
||||||
except RegistryError as err:
|
except RegistryError as err:
|
||||||
logger.error(f"Could not delete domain. Registry returned error: {err}")
|
logger.error(f"Could not delete domain. Registry returned error: {err}. Additional context: {err.note}")
|
||||||
raise err
|
raise err
|
||||||
except TransitionNotAllowed as err:
|
except TransitionNotAllowed as err:
|
||||||
logger.error("Could not delete domain. FSM failure: {err}")
|
logger.error("Could not delete domain. FSM failure: {err}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue