Pass py error msg in http headers
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
12073ac7d8
commit
765e0ba728
|
@ -251,7 +251,7 @@ def cgi_error_handler(environ, start_response, app):
|
||||||
raise
|
raise
|
||||||
|
|
||||||
except Exception as e:
|
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())
|
start_response(headers['status'], list(headers.items()), sys.exc_info())
|
||||||
log('ERROR: %s' % repr(e))
|
log('ERROR: %s' % repr(e))
|
||||||
return [cgitb.html(sys.exc_info())]
|
return [cgitb.html(sys.exc_info())]
|
||||||
|
|
Loading…
Reference in New Issue