diff --git a/server/apps/research/admin/article_admin.py b/server/apps/research/admin/article_admin.py index ef090fb..1a8fa17 100644 --- a/server/apps/research/admin/article_admin.py +++ b/server/apps/research/admin/article_admin.py @@ -54,7 +54,9 @@ def generate_summary_view(self, request): gpt_summary = asyncio.run(self._generate_summary(content)) return JsonResponse({'summary': gpt_summary}) except Exception as e: - return JsonResponse({'error': str(e)}, status=500) + import logging + logging.error("An error occurred while generating the summary", exc_info=True) + return JsonResponse({'error': 'An internal error has occurred!'}, status=500) return JsonResponse({'error': 'Invalid request method'}, status=400) def current_slug_history(self, obj):