Skip to content

feat(error): properly handle application down#76

Merged
mcollina merged 3 commits intoplatformatic:mainfrom
rozzilla:feat/error/properly-handle-application-down
Apr 22, 2025
Merged

feat(error): properly handle application down#76
mcollina merged 3 commits intoplatformatic:mainfrom
rozzilla:feat/error/properly-handle-application-down

Conversation

@rozzilla
Copy link
Copy Markdown
Contributor

fixes #74

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
setError(error)
}
}
useInterval(() => { getHealth() }, INTERVAL_HEALTH)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have a rough feeling this will be instantiated a lot as this component can be rendered multiple times. Can you verify?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have not noticed any issue when using this approach. Anyway, the code could be simplified (and we can avoid that potential re-render problem) by checking the service health before getting the metrics. You can have a look at e1010cc

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
@rozzilla rozzilla requested a review from mcollina April 22, 2025 07:04
Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit 2bf3181 into platformatic:main Apr 22, 2025
1 check passed
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.

if the frontend loses connection to the backend, it should show an error

2 participants