Merge "Return 409 status instead of 500 if package exists"
This commit is contained in:
commit
cfa4f8ae92
@ -42,6 +42,7 @@ General information
|
||||
* 403 ``Forbidden`` - access denied.
|
||||
* 404 ``Not Found`` - resource was not found
|
||||
* 405 ``Method Not Allowed`` - requested method is not supported for resource.
|
||||
* 409 ``Conflict`` - requested method resulted in a conflict with the current state of the resource.
|
||||
|
||||
* **Response of POSTs and PUTs**
|
||||
|
||||
|
@ -641,6 +641,17 @@ Created application returned
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+----------------+-----------------------------------------------------------+
|
||||
| Code | Description |
|
||||
+================+===========================================================+
|
||||
| 200 | Deployments information received successfully |
|
||||
+----------------+-----------------------------------------------------------+
|
||||
| 400 | Application package was considered invalid |
|
||||
+----------------+-----------------------------------------------------------+
|
||||
| 409 | Package with specified FQPN already exists |
|
||||
+----------------+-----------------------------------------------------------+
|
||||
|
||||
Delete application from environment
|
||||
-----------------------------------
|
||||
|
||||
|
@ -234,7 +234,7 @@ class Controller(object):
|
||||
except db_exc.DBDuplicateEntry:
|
||||
msg = _('Package with specified full name is already registered')
|
||||
LOG.exception(msg)
|
||||
raise exc.HTTPServerError(msg)
|
||||
raise exc.HTTPConflict(msg)
|
||||
return package.to_dict()
|
||||
|
||||
def get_ui(self, req, package_id):
|
||||
|
Loading…
x
Reference in New Issue
Block a user