Potential fix for code scanning alert no. 244: Information exposure through an exception

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Yeuoly 2025-10-30 16:00:24 +08:00 committed by GitHub
parent 447127cee4
commit 08e61d76d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -473,7 +473,8 @@ class TriggerSubscriptionBuilderService:
)
return response
except Exception as e:
error_response = Response(status=500, response=str(e))
logger.exception("Error during validation endpoint dispatch for endpoint_id=%s", endpoint_id)
error_response = Response(status=500, response="An internal error has occurred.")
cls.append_log(endpoint_id=endpoint_id, request=request, response=error_response)
return error_response