diff --git a/enterprise/api/v1/views.py b/enterprise/api/v1/views.py index 02ac5e759b..42f4775993 100644 --- a/enterprise/api/v1/views.py +++ b/enterprise/api/v1/views.py @@ -534,7 +534,9 @@ def algolia_key(self, request, *args, **kwargs): """ if not (api_key := getattr(settings, "ENTERPRISE_ALGOLIA_SEARCH_API_KEY", "")): - return Response("Algolia API key not configured", status=status.HTTP_500_INTERNAL_SERVER_ERROR) + LOGGER.warning("Algolia search API key is not configured. To enable this view, " + "set `ENTERPRISE_ALGOLIA_SEARCH_API_KEY` in settings.") + raise Http404 queryset = self.queryset.filter( **{