diff --git a/frappe/exceptions.py b/frappe/exceptions.py index f09583e215..20e858c543 100644 --- a/frappe/exceptions.py +++ b/frappe/exceptions.py @@ -244,6 +244,10 @@ class InReadOnlyMode(ValidationError): http_status_code = 503 # temporarily not available +class SessionBootFailed(ValidationError): + http_status_code = 500 + + class TooManyWritesError(Exception): pass diff --git a/frappe/public/js/frappe/desk.js b/frappe/public/js/frappe/desk.js index 4a81e8620b..74e1c4f1e7 100644 --- a/frappe/public/js/frappe/desk.js +++ b/frappe/public/js/frappe/desk.js @@ -34,15 +34,6 @@ frappe.Application = class Application { frappe.socketio.init(); frappe.model.init(); - if (frappe.boot.status === "failed") { - frappe.msgprint({ - message: frappe.boot.error, - title: __("Session Start Failed"), - indicator: "red", - }); - throw "boot failed"; - } - this.load_bootinfo(); this.load_user_permissions(); this.make_nav_bar(); diff --git a/frappe/www/app.py b/frappe/www/app.py index a32fef5748..dcb326af36 100644 --- a/frappe/www/app.py +++ b/frappe/www/app.py @@ -27,8 +27,7 @@ def get_context(context): try: boot = frappe.sessions.get() except Exception as e: - boot = frappe._dict(status="failed", error=str(e)) - print(frappe.get_traceback()) + raise frappe.SessionBootFailed from e # this needs commit csrf_token = frappe.sessions.get_csrf_token()