Skip to content

Commit

Permalink
Fix code scanning alert no. 22: Information exposure through an excep…
Browse files Browse the repository at this point in the history
…tion

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
TreyWW and github-advanced-security[bot] authored Oct 19, 2024
1 parent f78e012 commit 2ea9330
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rest_framework.response import Response

import logging
from backend.core.api.public import APIAuthToken
from rest_framework.decorators import api_view

Expand Down Expand Up @@ -42,5 +42,5 @@ def webhook_task_queue_handler_view_endpoint(request):
return Response({"status": "success", "result": result})

except Exception as e:
print(f"Error executing webhook task: {str(e)}")
return Response({"status": "error", "message": str(e)}, status=500)
logging.error(f"Error executing webhook task: {str(e)}")
return Response({"status": "error", "message": "An internal error has occurred."}, status=500)

0 comments on commit 2ea9330

Please sign in to comment.