Merge "Fix Erroneous 'Duplicate Entry' error message"

This commit is contained in:
Zuul 2020-01-23 16:11:22 +00:00 committed by Gerrit Code Review
commit 173ad897e7

View File

@ -60,13 +60,8 @@ class CustomerController(rest.RestController):
except TypeError:
raise ErrorStatus(409.1, 'Unable to create Customer ID {0}'.format(customer.uuid))
try:
result = customer_logic.create_customer(customer, uuid, request.transaction_id)
result = customer_logic.create_customer(customer, uuid, request.transaction_id)
except ValueError as exception:
raise
except Exception as exception:
raise ErrorStatus(409.2, 'Customer already exists.Error:{0}'.format(str(exception)))
LOG.info("CustomerController - Customer Created: " + str(result))
event_details = 'Customer {} {} created in regions: {}, with users: {}'.format(
uuid, customer.name, [r.name for r in customer.regions],