In django_nova/exceptions.py's handle_nova_error method, the following is done if a NovaUnauthorizedException bubbles up and isn't handled by the view itself (launch() in the example above).
def handle_nova_error(func):
"""
Decorator for handling nova errors in a generalized way.
"""
def decorator(*args, **kwargs):
try:
return func(*args, **kwargs)
except NovaUnavailableError:
return redirect('nova_unavailable')
return decorator
So are you saying its never trapping the error and somehow isn't even rendering the permission_denied template?
If you are getting redirected to "permission denied" text, then you aren't try/except'ing the error where it's happening.
Each view is wrapped with a decorator @handle_nova_error, like so:
@login_required
@handle_nova_error
def launch(request, project_id, image_id):
...
In django_ nova/exceptions .py's handle_nova_error method, the following is done if a NovaUnauthorize dException bubbles up and isn't handled by the view itself (launch() in the example above).
def handle_ nova_error( func): Error: 'nova_unavailab le')
"""
Decorator for handling nova errors in a generalized way.
"""
def decorator(*args, **kwargs):
try:
return func(*args, **kwargs)
except NovaUnavailable
return redirect(
return decorator
So are you saying its never trapping the error and somehow isn't even rendering the permission_denied template?