Merge "Error message should not include SQL command"
This commit is contained in:
commit
4b79d3e631
@ -185,8 +185,8 @@ def create_resource_provider(req):
|
||||
resource_provider.create()
|
||||
except db_exc.DBDuplicateEntry as exc:
|
||||
raise webob.exc.HTTPConflict(
|
||||
_('Conflicting resource provider already exists: %(error)s') %
|
||||
{'error': exc})
|
||||
_('Conflicting resource provider %(name)s already exists.') %
|
||||
{'name': data['name']})
|
||||
except exception.ObjectActionError as exc:
|
||||
raise webob.exc.HTTPBadRequest(
|
||||
_('Unable to create resource provider %(rp_uuid)s: %(error)s') %
|
||||
@ -331,8 +331,8 @@ def update_resource_provider(req):
|
||||
resource_provider.save()
|
||||
except db_exc.DBDuplicateEntry as exc:
|
||||
raise webob.exc.HTTPConflict(
|
||||
_('Conflicting resource provider already exists: %(error)s') %
|
||||
{'error': exc})
|
||||
_('Conflicting resource provider %(name)s already exists.') %
|
||||
{'name': data['name']})
|
||||
except exception.ObjectActionError as exc:
|
||||
raise webob.exc.HTTPBadRequest(
|
||||
_('Unable to save resource provider %(rp_uuid)s: %(error)s') %
|
||||
|
@ -54,7 +54,7 @@ tests:
|
||||
uuid: $ENVIRON['RP_UUID']
|
||||
status: 409
|
||||
response_strings:
|
||||
- Conflicting resource provider already exists
|
||||
- Conflicting resource provider $ENVIRON['RP_NAME'] already exists
|
||||
response_json_paths:
|
||||
$.errors[0].title: Conflict
|
||||
|
||||
@ -67,7 +67,7 @@ tests:
|
||||
uuid: ada30fb5-566d-4fe1-b43b-28a9e988790c
|
||||
status: 409
|
||||
response_strings:
|
||||
- Conflicting resource provider already exists
|
||||
- Conflicting resource provider $ENVIRON['RP_NAME'] already exists
|
||||
response_json_paths:
|
||||
$.errors[0].title: Conflict
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user