better error handling in domain deletion

This commit is contained in:
Matt-Spence 2025-02-10 15:58:14 -05:00
parent 78be172ee4
commit e751388533
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -3679,10 +3679,10 @@ class DomainAdmin(ListHeaderAdmin, ImportExportModelAdmin):
),
messages.ERROR,
)
except Exception:
except Exception as e:
self.message_user(
request,
"Could not delete: An unspecified error occured",
f"Could not delete: An unspecified error occured: {e}",
messages.ERROR,
)
else:

View file

@ -1097,7 +1097,7 @@ class Domain(TimeStampedModel, DomainHelper):
except RegistryError as e:
logger.error(f"Error deleting contact: {contact}, {e}", exc_info=True)
logger.info("Finished deleting contacts")
logger.info(f"Finished deleting contacts for {self.name}")
# delete ds data if it exists
if self.dnssecdata: