Fixed hidden validation error during frontend reload

refs https://github.com/TryGhost/Toolbox/issues/151
refs cbec6aa49e

- 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).
This commit is contained in:
Naz 2021-12-01 16:23:49 +04:00
parent 5aa08acd33
commit 3150c87935

View File

@ -107,7 +107,7 @@ class RouteSettings {
};
try {
bridge.reloadFrontend();
await bridge.reloadFrontend();
} catch (err) {
return bringBackValidRoutes()
.finally(() => {