bcgov / bcgov/entity

Entity UIs: startup errors are caught but not logged

Open
#13,811 0 comments 0 reactions 0 assignees View on GitHub
bug ENTITY - DO NOT USE Priority2
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

As part of the UI (app) startup, a config file is loaded. The async function that does this can throw an error (aka return a rejected promise). The app startup code (main.ts) catches this error but does not see the error message, so an empty message is displayed in the dev console.

The thrown error message should be displayed, to inform a user/tester/dev why the error occurred.

This bug is not a P1 since the error is caught (and a browser alert is displayed), but the error message should be displayed in the dev console.

I found this in Edit UI but it probably happens (and should be fixed) in Filings UI and Create UI since they have similar code.

I think this previously worked so something appears to have changed.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the startup code in main.ts for Edit UI and compare the analogous startup code in Filings UI and Create UI. Verify how the rejected config-loading promise is caught and confirm that the thrown error message, rather than an empty message, appears in the dev console for each affected UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.