Skip to content

Commit

Permalink
Fixes error exposing
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-plane committed Nov 9, 2024
1 parent e68ab40 commit 30b45bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apiserver/plane/app/views/external/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def post(self, request, slug, project_id):
text, error = get_gpt_response(task, request.data.get("prompt", False), OPENAI_API_KEY, GPT_ENGINE)
if error:
return Response(
{"error": f"LLM API error: {error}"},
{"error": "An internal error has occurred."},
status=status.HTTP_500_INTERNAL_SERVER_ERROR,
)

Expand Down Expand Up @@ -122,7 +122,7 @@ def post(self, request, slug):
text, error = get_gpt_response(task, request.data.get("prompt", False), OPENAI_API_KEY, GPT_ENGINE)
if error:
return Response(
{"error": f"LLM API error: {error}"},
{"error": "An internal error has occurred."},
status=status.HTTP_500_INTERNAL_SERVER_ERROR,
)

Expand Down

0 comments on commit 30b45bf

Please sign in to comment.