Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions apps/central/src/components/async-route.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions e2e-tests/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading