def METHOD_NAME(func):
  def decorator(*args, **kwargs):
    response = {}
    try:
      return func(*args, **kwargs)
    except Exception as e:
      LOG.exception('Error running %s' % func)
      response['status'] = -1
      response['message'] = smart_unicode(e)
    finally:
      if response:
        return JsonResponse(response)
  return decorator