Merge "Fix response status for invalid routes"
This commit is contained in:
commit
1baaacfa3a
@ -105,7 +105,7 @@ class SecretController(controllers.ACLMixin):
|
||||
pecan.abort(405)
|
||||
else:
|
||||
# only 'acl' and 'metadata' as sub-resource is supported
|
||||
pecan.abort(405)
|
||||
pecan.abort(404)
|
||||
|
||||
@pecan.expose(generic=True)
|
||||
def index(self, **kwargs):
|
||||
|
@ -230,7 +230,7 @@ class WhenTestingSecretACLsResource(utils.BarbicanAPIBaseTestCase,
|
||||
resp = self.app.get(
|
||||
'/secrets/{0}/incorrect_acls'.format(secret_id),
|
||||
expect_errors=True)
|
||||
self.assertEqual(405, resp.status_int)
|
||||
self.assertEqual(404, resp.status_int)
|
||||
|
||||
def test_full_update_secret_acls_modify_project_access_value(self):
|
||||
"""ACLs full update with userids where project-access flag modified."""
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed the response code for invalid subroutes for individual secrets. The
|
||||
API was previously responding with the incorrect code "406 - Method not
|
||||
allowed", but now responds correctly with "404 - Not Found".
|
Loading…
Reference in New Issue
Block a user