Skip to content

Fix ClickHouse outage crashing all dashboard pages#151

Merged
juanmrad merged 4 commits intomainfrom
clickhouse-gracefully-handle-errors
Mar 25, 2026
Merged

Fix ClickHouse outage crashing all dashboard pages#151
juanmrad merged 4 commits intomainfrom
clickhouse-gracefully-handle-errors

Conversation

@juanmrad
Copy link
Member

Context & Requests for Reviewers

Fixes #145. When ClickHouse is down, every dashboard page crashed because analytics query errors propagated uncaught through resolvers and client components.

Added better handling of the clickhouse error. Also added a lightweight checker for health on clickhouse so we can properly show that the db is down.

Open to suggestions on the error messages there.

Screenshot 2026-03-24 at 8 37 29 PM

Copy link
Contributor

@vinaysrao1 vinaysrao1 left a comment

Choose a reason for hiding this comment

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

nits about try - catch.

user.orgId,
)) as any;
} catch {
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

empty catch?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is intentional as to not crash the front-end with the error response. I'll add a console log so the back-end has a hint on the console, but otherwise this is intended.

);
return true;
} catch {
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

Copy link
Member Author

Choose a reason for hiding this comment

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

same as above :)

@juanmrad juanmrad merged commit 0d285da into main Mar 25, 2026
12 checks passed
@juanmrad juanmrad deleted the clickhouse-gracefully-handle-errors branch March 26, 2026 02:23
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 Clickhouse is down, it brings down all of Coop

2 participants