|
We use it to display user feedback form on unhandled error (in Is there now some way to get event ID for events captured inside integrations, and not manually? The documentation mentions that |
Answered by
nijel
May 10, 2024
Replies: 2 comments 2 replies
|
Facing similar Issue |
0 replies
|
This worked for me somehow, no duplicate issues class SentryEventMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
response = self.get_response(request)
return response
def process_exception(self, request, exception):
event_id = sentry_sdk.capture_exception(exception)
request.sentry_event_id = event_id
def custom500(request, exception=None):
"""Custom 500"""
return JsonResponse(
{
"message": "Internal Server Error",
"code": getattr(request, "sentry_event_id", None),
},
status=500,
) |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Actually, it is planned, see #3049 and #3057