diff --git a/pywb/framework/test/test_wsgi_wrapper.py b/pywb/framework/test/test_wsgi_wrapper.py index e46cded5..39da76c2 100644 --- a/pywb/framework/test/test_wsgi_wrapper.py +++ b/pywb/framework/test/test_wsgi_wrapper.py @@ -14,7 +14,7 @@ class TestOkApp: class TestErrApp: def __call__(self, env): - raise Exception('Test Error') + raise Exception('Test Unexpected Error') class TestCustomErrApp: def __call__(self, env): @@ -41,8 +41,8 @@ def test_err_app(): testapp = webtest.TestApp(the_app) resp = testapp.get('/abc', expect_errors=True) - assert resp.status_int == 400 - assert '400 Bad Request Error: Test Error' in resp.body + assert resp.status_int == 500 + assert '500 Internal Server Error Error: Test Unexpected Error' in resp.body def test_custom_err_app(): the_app = init_app(initer(TestCustomErrApp), load_yaml=False) diff --git a/pywb/framework/wsgi_wrappers.py b/pywb/framework/wsgi_wrappers.py index cbd3825d..fdc96fb7 100644 --- a/pywb/framework/wsgi_wrappers.py +++ b/pywb/framework/wsgi_wrappers.py @@ -118,7 +118,7 @@ class WSGIApp(object): if hasattr(exc, 'status'): status = exc.status() else: - status = '400 Bad Request' + status = '500 Internal Server Error' if hasattr(exc, 'url'): err_url = exc.url diff --git a/pywb/utils/wbexception.py b/pywb/utils/wbexception.py index b94a6313..24e34f73 100644 --- a/pywb/utils/wbexception.py +++ b/pywb/utils/wbexception.py @@ -6,8 +6,9 @@ class WbException(Exception): Exception.__init__(self, msg) self.url = url - def status(self): - return '500 Internal Server Error' +# Default Error Code +# def status(self): +# return '500 Internal Server Error' #=================================================================