Error handling on the post for security contact

This commit is contained in:
Rachid Mrad 2023-10-17 14:23:42 -04:00
parent 5fbe72ce5a
commit 0e5978011d
No known key found for this signature in database
GPG key ID: EF38E4CEC4A8F3CF
6 changed files with 108 additions and 7 deletions

View file

@ -701,7 +701,7 @@ class Domain(TimeStampedModel, DomainHelper):
and errorCode != ErrorCode.COMMAND_COMPLETED_SUCCESSFULLY
):
# TODO- ticket #433 look here for error handling
raise Exception("Unable to add contact to registry")
raise RegistryError(code=errorCode)
# contact doesn't exist on the domain yet
logger.info("_set_singleton_contact()-> contact has been added to the registry")