Skip to content

[Synced PR #2145] feat(data): add error state and backoff to useCpu, useMemory, useDisk hooks (#2119) - #46

Open
tmdeveloper007 wants to merge 1 commit into
mainfrom
mavis/termui-pr-2145-20260730013912
Open

[Synced PR #2145] feat(data): add error state and backoff to useCpu, useMemory, useDisk hooks (#2119)#46
tmdeveloper007 wants to merge 1 commit into
mainfrom
mavis/termui-pr-2145-20260730013912

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Owner

Upstream PR: Karanjot786/TermUI#2145

Original Author: divyanshim27
State: Closed ✗
Merge Commit SHA: None
Labels: type:feature, stale, area:core, area:data, type:testing


PR description:

Summary

Adds error: Error | null state to useCpu, useMemory, and useDisk
hooks so polling failures degrade gracefully instead of crashing or silently
freezing the component.

Problem

In containerized environments (Docker without --pid=host, rootless containers,
CI runners), /proc/stat reads and sysctl calls fail with EPERM or EACCES.
Without try/catch inside the useEffect polling loop, this produced unhandled
promise rejections — either silently swallowing the…

_

Synced from upstream by Mavis TermUI Bot on 2026-07-30 01:39 UTC

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.

1 participant