Skip to content

Commit e3e1ce9

Browse files
Potential fix for code scanning alert no. 12: Information exposure through an exception
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent b3592a1 commit e3e1ce9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/views/aimodel_execution.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ def call_aimodel(request: Request, model_id: str) -> Response:
9090
status=status.HTTP_400_BAD_REQUEST,
9191
)
9292
except Exception as e:
93+
logging.exception("Unexpected error during model execution")
9394
return Response(
94-
{"error": f"Model execution failed: {str(e)}"},
95+
{"error": "Model execution failed."},
9596
status=status.HTTP_500_INTERNAL_SERVER_ERROR,
9697
)
9798

0 commit comments

Comments
 (0)