diff --git a/barbican/api/middleware/context.py b/barbican/api/middleware/context.py index a114998a8..499c66c4e 100644 --- a/barbican/api/middleware/context.py +++ b/barbican/api/middleware/context.py @@ -88,7 +88,7 @@ class ContextMiddleware(BaseContextMiddleware): if ctx.project_id is None: LOG.debug("X_PROJECT_ID not found in request") - return webob.exc.HTTPUnauthorized() + raise webob.exc.HTTPUnauthorized() ctx.is_admin = CONF.admin_role.strip().lower() in ctx.roles