fix: show proper error with traceback when boot fails
This commit is contained in:
parent
0219eab820
commit
8409caef6f
3 changed files with 5 additions and 11 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue