Skip to content

fix(heureka): gracefully handle fatal errors#1197

Merged
taymoor89 merged 6 commits intomainfrom
847-error-handling
Oct 30, 2025
Merged

fix(heureka): gracefully handle fatal errors#1197
taymoor89 merged 6 commits intomainfrom
847-error-handling

Conversation

@taymoor89
Copy link
Copy Markdown
Contributor

Summary

Previously when there was a fatal error in case of broken API Heureka wasn't even displaying app layout. Now using ErrorBoundary the fatal errors that typically happen because of a rejected promise are gracefully handled and displayed inline.

Changes Made

  • Moved App header outside of the router.
  • If an error boundary is missing the root route catches the error and displays it.
  • Errors are displayed inline where they happen instead of always displaying them on top which makes user experience better.
  • Removed MessagesProvider as it is not need at the moment.

Related Issues

Screenshots (if applicable)

2025-10-08_11-55-10.mp4
2025-10-08_11-56-05.mp4
2025-10-08_11-57-23.mp4

Testing Instructions

  1. pnpm i
  2. pnpm TASK

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.
  • I have created a changeset for my changes.

PR Manifesto

Review the PR Manifesto for best practises.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Oct 8, 2025

🦋 Changeset detected

Latest commit: ec8a203

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@cloudoperators/juno-app-heureka Patch
@cloudoperators/juno-app-greenhouse Patch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 8, 2025

PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-10-30 14:00 UTC

@taymoor89 taymoor89 marked this pull request as ready for review October 8, 2025 11:15
@taymoor89 taymoor89 requested a review from a team as a code owner October 8, 2025 11:15
@taymoor89 taymoor89 self-assigned this Oct 8, 2025
Copy link
Copy Markdown
Collaborator

@ArtieReus ArtieReus left a comment

Choose a reason for hiding this comment

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

Very good job I like how you have designed it. I just added 2 comments and one of them is about testing. Would it make sense at that stage at least for the new files introduced to add some tests?

Comment thread apps/heureka/src/components/common/ErrorBoundary/ErrorMessage.tsx
Comment thread apps/heureka/src/components/common/ErrorBoundary/ErrorMessage.tsx
Copy link
Copy Markdown
Contributor

@hodanoori hodanoori left a comment

Choose a reason for hiding this comment

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

Great work, thanks Taimoor. Please address the following case in this PR as well, as we discussed it this morning in our team round:

Display a loading indicator inside the filter selects while waiting for the GetServiceFilters request to complete, and if that request fails, show an appropriate “Failed to load filters” message inside Filter selects.
However, the services list should still render and remain usable (including search functionality and navigate to other panel or pages view).

Copy link
Copy Markdown
Collaborator

@ArtieReus ArtieReus left a comment

Choose a reason for hiding this comment

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

Shouldn't here display another kind of error here?
Screenshot 2025-10-13 at 16 22 52

Copy link
Copy Markdown
Collaborator

@ArtieReus ArtieReus left a comment

Choose a reason for hiding this comment

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

I was able to get a black screen with following initialFilters:

  "initialFilters": {
    "support_group": ["containerss"]
  },
Screenshot 2025-10-13 at 16 44 33

@taymoor89 taymoor89 requested a review from franzheidl as a code owner October 28, 2025 16:09
@taymoor89 taymoor89 force-pushed the 847-error-handling branch 4 times, most recently from 465caaf to bbdfa64 Compare October 30, 2025 10:13
@taymoor89
Copy link
Copy Markdown
Contributor Author

I was able to get a black screen with following initialFilters:

  "initialFilters": {
    "support_group": ["containerss"]
  },
Screenshot 2025-10-13 at 16 44 33

That was from Hoda's PR, this should not happen in this PR.

@taymoor89
Copy link
Copy Markdown
Contributor Author

Shouldn't here display another kind of error here? Screenshot 2025-10-13 at 16 22 52

True I fixed it, but in this PR the kind or the text of the error message is not important the most important thing is that the app should not crash in any case backend or user input failure.

ArtieReus
ArtieReus previously approved these changes Oct 30, 2025
Copy link
Copy Markdown
Collaborator

@ArtieReus ArtieReus left a comment

Choose a reason for hiding this comment

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

Great job!! Thx!!

Comment thread .changeset/proud-facts-happen.md Outdated
Comment thread .changeset/proud-facts-happen.md Outdated
@taymoor89 taymoor89 merged commit 6b45b16 into main Oct 30, 2025
16 checks passed
@taymoor89 taymoor89 deleted the 847-error-handling branch October 30, 2025 14:00
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.

4 participants