Fix Erroneous 'Duplicate Entry' error message
Change-Id: Ic296c493b37c1689e4c24c9402830e6120b8a085
This commit is contained in:
parent
8f4ffa31e7
commit
5548613de6
@ -60,13 +60,8 @@ class CustomerController(rest.RestController):
|
|||||||
except TypeError:
|
except TypeError:
|
||||||
raise ErrorStatus(409.1, 'Unable to create Customer ID {0}'.format(customer.uuid))
|
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))
|
LOG.info("CustomerController - Customer Created: " + str(result))
|
||||||
event_details = 'Customer {} {} created in regions: {}, with users: {}'.format(
|
event_details = 'Customer {} {} created in regions: {}, with users: {}'.format(
|
||||||
uuid, customer.name, [r.name for r in customer.regions],
|
uuid, customer.name, [r.name for r in customer.regions],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user