From 765e0ba7286d8e281c273489abe51d2f778fafba Mon Sep 17 00:00:00 2001 From: pictuga Date: Mon, 22 Nov 2021 23:22:13 +0100 Subject: [PATCH] Pass py error msg in http headers --- morss/wsgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss/wsgi.py b/morss/wsgi.py index f601d81..c4ad971 100644 --- a/morss/wsgi.py +++ b/morss/wsgi.py @@ -251,7 +251,7 @@ def cgi_error_handler(environ, start_response, app): raise except Exception as e: - headers = {'status': '500 Oops', 'content-type': 'text/html'} + headers = {'status': '500 Oops', 'content-type': 'text/html', 'x-morss-error': repr(e)} start_response(headers['status'], list(headers.items()), sys.exc_info()) log('ERROR: %s' % repr(e)) return [cgitb.html(sys.exc_info())]