Skip to content

Commit

Permalink
Merge pull request #520 from TreyWW/alert-autofix-22
Browse files Browse the repository at this point in the history
Fix code scanning alert no. 22: Information exposure through an exception
  • Loading branch information
TreyWW authored Oct 19, 2024
2 parents 118e3cf + 2ea9330 commit a13ffa6
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 a13ffa6

Please sign in to comment.