try:
with handle_rados_error(component=None): # make the None controller the fallback.
return handler(*args, **kwargs)
- # Don't catch cherrypy.* Exceptions.
+ # pylint: disable=try-except-raise
+ except (cherrypy.HTTPRedirect, cherrypy.NotFound, cherrypy.HTTPError):
+ raise
except (ViewCacheNoDataException, DashboardException) as error:
logger.exception('Dashboard Exception')
cherrypy.response.headers['Content-Type'] = 'application/json'
cherrypy.response.status = getattr(error, 'status', 400)
return json.dumps(serialize_dashboard_exception(error)).encode('utf-8')
- except cherrypy.HTTPRedirect:
- # No internal errors
- raise
except Exception as error:
logger.exception('Internal Server Error')
raise error