diff --git a/apps/central/src/components/async-route.vue b/apps/central/src/components/async-route.vue index 382ce6e59..8064729d9 100644 --- a/apps/central/src/components/async-route.vue +++ b/apps/central/src/components/async-route.vue @@ -32,7 +32,7 @@ import { noop } from '../util/util'; export default { name: 'AsyncRoute', components: { Loading, PageBody }, - inject: ['alert', 'location'], + inject: ['alert', 'location', 'logger'], inheritAttrs: false, // See routes.js for more information about these props. props: { @@ -111,8 +111,10 @@ export default { this.component = markRaw(m.default); } }) - .catch(() => { + .catch(err => { if (!canceled) { + this.logger.error('async-route', 'loadError:', err); + // It would be ideal to show a more informative error message. // However, the error seems to provide limited information. For // example, if there is a 404 because Frontend was rebuilt, the diff --git a/e2e-tests/util.js b/e2e-tests/util.js index 8b85ec438..7a042240b 100644 --- a/e2e-tests/util.js +++ b/e2e-tests/util.js @@ -103,6 +103,9 @@ const globalAllowedLogs = [ // * https://github.com/getodk/central/issues/1584 // * https://github.com/getodk/central/issues/2070 'SyntaxError: 17', + + // Failing on these messages is highly disruptive, as it can randomly happen to non-fatal messages. + 'Execution context was destroyed, most likely because of a navigation', ]; function isFatalConsoleMessage(allowedLogs, consoleMsg, normalisedMsg) {