def METHOD_NAME(view_fn):
  def decorator(*args, **kwargs):
    status = 500
    response = {
      'message': ''
    }
    try:
      if has_catalog(args[0].user): # TODO
        return view_fn(*args, **kwargs)
      else:
        raise CatalogApiException('Navigator API is not configured.')
    except CatalogApiException as e:
      try:
        response['message'] = json.loads(e.message)
      except Exception:
        response['message'] = force_unicode(e.message)
    except Exception as e:
      message = force_unicode(e)
      response['message'] = message
      LOG.exception(message)
    return JsonResponse(response, status=status)
  return decorator