Hey!
I’d like to return a json message with sentry event_id field as a body of 500 response. How could this be done? Ma exception view looks as follow:
@exception_view_config(Exception, renderer="json")
def exception_view(e: Exception, request: IRequest):
request.response.status = HTTPStatus.INTERNAL_SERVER_ERROR
return {"log_id": sentry_event_id} # where event id is stored?
Thanks in advance!