Skip to content

async-route: show load error in console - #1743

Merged
alxndrsn merged 6 commits into
getodk:masterfrom
alxndrsn:async-route-error
Aug 6, 2026
Merged

async-route: show load error in console#1743
alxndrsn merged 6 commits into
getodk:masterfrom
alxndrsn:async-route-error

Conversation

@alxndrsn

@alxndrsn alxndrsn commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

For the end-user, there is already a toast displayed when a load error occurs, reading:

The page you requested could not be loaded. Please refresh the page and try again.

Without this logging, there is no indication to a developer what the error actually is.

Screenshot_2026-08-05_08-54-33

What has been done to verify that this works as intended?

  • ran locally
  • ci

Why is this the best possible solution? Were any other approaches considered?

If bundle size or prod behaviour are sacrosanct, the logging could be filtered from the final bundle somehow?

How does this change impact users? Describe intentional behavior changes from code updates. What are the regression risks?

Most users won't encounter these errors, and if they do then they're unlikely to notice the logging.

Does this change require updates to user documentation? If so, please file an issue here and include the link below.

No.

For the end-user, there is already a toast displayed when a load error occurs, reading:

> The page you requested could not be loaded. Please refresh the page and try again.

Without this logging, there is no indication to a developer what the error actually is.
@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6ebfab3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment thread apps/central/src/components/async-route.vue Outdated
@matthew-white

Copy link
Copy Markdown
Member

Adding this logging sounds reasonable to me. 👍 We do similar logging when there's a normal request error (e.g., useRequest() calls logAxiosError()).

That said, I wouldn't expect to see these errors during local development. The main case I've seen it is when a server has been upgraded.

Co-authored-by: Matthew White <matthew-white@users.noreply.github.com>
@alxndrsn

alxndrsn commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

That said, I wouldn't expect to see these errors during local development.

Can be triggered with a broken import:

$ git diff
diff --git a/apps/central/src/components/user/edit/password.vue b/apps/central/src/components/user/edit/password.vue
index 7da343aa6..c95f52d7e 100644
--- a/apps/central/src/components/user/edit/password.vue
+++ b/apps/central/src/components/user/edit/password.vue
@@ -40,7 +40,7 @@ except according to the terms contained in the LICENSE file.
 
 <script>
 import FormGroup from '../../form-group.vue';
-import Spinner from '../../spinner.vue';
+import Spanner from '../../spinner.vue';
 
 import useRequest from '../../../composables/request';
 import { apiPaths } from '../../../util/request';

@matthew-white

Copy link
Copy Markdown
Member

Ooh good point. OK maybe I'm totally misremembering and this error does come up. 🤔

@matthew-white

matthew-white commented Aug 5, 2026

Copy link
Copy Markdown
Member

Just wanted to make sure you saw the follow-up to my code suggestion. My first suggestion wasn't quite right. 😅

@alxndrsn
alxndrsn marked this pull request as ready for review August 5, 2026 10:07
@alxndrsn
alxndrsn requested a review from matthew-white August 5, 2026 10:07
@alxndrsn
alxndrsn merged commit 9029bbd into getodk:master Aug 6, 2026
53 of 54 checks passed
@alxndrsn
alxndrsn deleted the async-route-error branch August 6, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants