diff --git a/alyx/alyx/urls.py b/alyx/alyx/urls.py index 4fb024c7..05177bd1 100644 --- a/alyx/alyx/urls.py +++ b/alyx/alyx/urls.py @@ -1,6 +1,8 @@ +import traceback from django.conf.urls import include from django.urls import path from django.contrib import admin +from django.shortcuts import render from rest_framework.authtoken import views as authv from rest_framework.documentation import include_docs_urls @@ -25,3 +27,11 @@ urlpatterns += [path('ibl_reports/', include('ibl_reports.urls')), ] except ModuleNotFoundError: pass + + +def handler500(request): + ctx = { + 'request': request.path, + 'traceback': traceback.format_exc() + } + return render(request, 'error_500.html', ctx) diff --git a/alyx/templates/error_500.html b/alyx/templates/error_500.html new file mode 100644 index 00000000..003a1945 --- /dev/null +++ b/alyx/templates/error_500.html @@ -0,0 +1,76 @@ + + +
+ + +Oupsy, something went wrong on our end. !
+Feel free to reach out with the information below, we'll do our best to resolve the issue.
+