mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Switch from raven to sentry_sdk
This commit is contained in:
@@ -8,13 +8,13 @@
|
||||
<h1>{% trans "Internal Server Error" %}</h1>
|
||||
<p>{% trans "We had trouble processing your request." %}</p>
|
||||
<p>{% trans "If this problem persists, please contact us." %}</p>
|
||||
{% if request.sentry.id %}
|
||||
{% if sentry_event_id %}
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
If you contact us, please send us the following code:
|
||||
{% endblocktrans %}
|
||||
<br>
|
||||
{{ request.sentry.id }}
|
||||
{{ sentry_event_id }}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p>{{ exception }}</p>
|
||||
|
||||
@@ -7,6 +7,7 @@ from django.template.loader import get_template
|
||||
from django.utils.functional import Promise
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.views.decorators.csrf import requires_csrf_token
|
||||
from sentry_sdk import last_event_id
|
||||
|
||||
|
||||
def csrf_failure(request, reason=""):
|
||||
@@ -65,5 +66,6 @@ def server_error(request):
|
||||
except TemplateDoesNotExist:
|
||||
return HttpResponseServerError('<h1>Server Error (500)</h1>', content_type='text/html')
|
||||
return HttpResponseServerError(template.render({
|
||||
'request': request
|
||||
'request': request,
|
||||
'sentry_event_id': last_event_id(),
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user