From 3150c87935c0702b76f90e4385ce6d1a65fd8b21 Mon Sep 17 00:00:00 2001 From: Naz Date: Wed, 1 Dec 2021 16:23:49 +0400 Subject: [PATCH] Fixed hidden validation error during frontend reload refs https://github.com/TryGhost/Toolbox/issues/151 refs https://github.com/TryGhost/Ghost/commit/cbec6aa49e012d2e6eaa8322c1ea5d7f3a67e653 - Without the await the try/catch block does not catch a pottential validation error straight away, which leads to a 500 error instead of a validation error being returned. The regression was introduced during the refactor (part of referenced commit). --- core/server/services/route-settings/route-settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/services/route-settings/route-settings.js b/core/server/services/route-settings/route-settings.js index c0203cd2cb..a3d6eb9ec5 100644 --- a/core/server/services/route-settings/route-settings.js +++ b/core/server/services/route-settings/route-settings.js @@ -107,7 +107,7 @@ class RouteSettings { }; try { - bridge.reloadFrontend(); + await bridge.reloadFrontend(); } catch (err) { return bringBackValidRoutes() .finally(() => {