Skip to content

fix: Adds better error handling of workspace loading errors#1169

Merged
tadayosi merged 1 commit into
hawtio:mainfrom
phantomjinx:app-status
Oct 18, 2024
Merged

fix: Adds better error handling of workspace loading errors#1169
tadayosi merged 1 commit into
hawtio:mainfrom
phantomjinx:app-status

Conversation

@phantomjinx
Copy link
Copy Markdown
Member

  • Adds a status plugin for displaying errors messages if the workspace failed to load. Such errors can get lost in the console log and a blank page is the result in the client.

  • workspace.ts

    • If an error occurs then add them to a collection in the workspace
    • Provides an api for quizzing the workspace on whether it has errored
  • app-status

    • Plugin that is only active if
      • there is a current connection (no point in displaying if nothing has been connected to yet)
      • there are no mbeans collected from the jolokia connection
      • Errors were flagged from the workspace
    • Assuming the plugin is active, offer a component that provides notification of the workspace *

@phantomjinx
Copy link
Copy Markdown
Member Author

So I found I was having issues with the workspace being empty (due to an unrelated error) and the console message that the workspace was empty was buried in the console. What was more obvious was the blank page when a connection was attempted.

Therefore, the idea is to have a status plugin pop up that checks on the workspace. If it succeeds then the plugin never appears. However, if there is a failure then at least a single plugin is loaded and displayed giving the user some indication of the issue.

Screenshot_20241016_161139

@phantomjinx phantomjinx self-assigned this Oct 16, 2024
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 16, 2024

Test Results

  8 files  ±0    8 suites  ±0   47m 20s ⏱️ + 2m 30s
 66 tests ±0   64 ✅ ±0   2 💤 ±0  0 ❌ ±0 
536 runs  ±0  508 ✅ ±0  28 💤 ±0  0 ❌ ±0 

Results for commit f0a8cd6. ± Comparison against base commit d12490c.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Member

@tadayosi tadayosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the enhancement looks great, but there are a few considerations we'd like to take care of a bit.

Comment thread packages/hawtio/package.json Outdated
Comment thread packages/hawtio/src/plugins/app-status/globals.ts Outdated
Comment thread packages/hawtio/src/plugins/shared/workspace.ts Outdated
Comment thread packages/hawtio/src/plugins/shared/workspace.ts
Comment thread packages/hawtio/package.json
* Adds a status plugin for displaying errors messages if the workspace
  failed to load. Such errors can get lost in the console log and a blank
  page is the result in the client.

* workspace.ts
  * If an error occurs then add them to a collection in the workspace
  * Provides an api for quizzing the workspace on whether it has errored

* console-status
  * Plugin that is only active if
    * there is a current connection (no point in displaying if nothing
      has been connected to yet)
    * there are no mbeans collected from the jolokia connection
    * Errors were flagged from the workspace
  * Assuming the plugin is active, offer a component that provides
    notification of the workspace
 *
@tadayosi tadayosi merged commit 9b4c600 into hawtio:main Oct 18, 2024
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