Skip to content

fix: Resolve crashes and improve error handling in core tools#7

Open
nkissick-del wants to merge 1 commit intojmagar:mainfrom
nkissick-del:fix/tool-stability
Open

fix: Resolve crashes and improve error handling in core tools#7
nkissick-del wants to merge 1 commit intojmagar:mainfrom
nkissick-del:fix/tool-stability

Conversation

@nkissick-del
Copy link
Copy Markdown

@nkissick-del nkissick-del commented Feb 4, 2026

Overview

Resolves multiple runtime errors encountered during testing. These changes ensure the server handles unexpected empty values gracefully instead of crashing.

Fixes

  • System Tool:
    • Fixed attribute errors when CPU or Memory details are missing or malformed.
    • Added safe fallbacks for version strings and capacity formatting.
  • Storage Tool:
    • Improved error propagation for disk operations to provide useful feedback instead of generic failures.
  • RClone Tool:
    • Enhanced error handling robustness for configuration requests.
  • Health Tool:
    • Corrected severity ranking logic to properly aggregate system health status.

Verification

  • Verified that system information tools return valid data structures even when specific hardware information is unavailable.

Summary by cubic

Hardened core tools to handle missing or malformed API data without crashing and return clear, actionable errors. Improves health checks, RClone config handling, disk details, and system info stability.

  • Bug Fixes

    • Health: added severity ranking, latency thresholds, timezone-aware timestamps, and accurate process uptime; updated GraphQL to versions.core.unraid.
    • RClone: handled missing rclone/remotes/configForm fields, sanitized providerType input, and consistently propagated ToolError.
    • Storage: made byte/partition size formatting safe, included interface/smart/partition details, and increased timeout for slow disk queries.
    • System: added format_kb helper, handled unknown CPU cores/threads and memory layout safely, adapted to new versions schema, and improved connect settings filtering.
  • Migration

    • list_notifications now uses notification_type instead of type.

Written for commit 01fb43a. Summary will update on new commits.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 4, 2026

Warning

Rate limit exceeded

@nkissick-del has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 24 minutes and 29 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 4 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="unraid_mcp/tools/storage.py">

<violation number="1" location="unraid_mcp/tools/storage.py:85">
P2: Breaking change: renamed tool parameter from `type` to `notification_type` while docs still reference `type`, which will break existing callers using the old parameter name.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

offset: int,
limit: int,
importance: str | None = None
notification_type: str, offset: int, limit: int, importance: str | None = None
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot Feb 4, 2026

Choose a reason for hiding this comment

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

P2: Breaking change: renamed tool parameter from type to notification_type while docs still reference type, which will break existing callers using the old parameter name.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At unraid_mcp/tools/storage.py, line 85:

<comment>Breaking change: renamed tool parameter from `type` to `notification_type` while docs still reference `type`, which will break existing callers using the old parameter name.</comment>

<file context>
@@ -82,10 +82,7 @@ async def get_notifications_overview() -> dict[str, Any]:
-        offset: int,
-        limit: int,
-        importance: str | None = None
+        notification_type: str, offset: int, limit: int, importance: str | None = None
     ) -> list[dict[str, Any]]:
         """Lists notifications with filtering. Type: UNREAD/ARCHIVE. Importance: INFO/WARNING/ALERT."""
</file context>
Fix with Cubic

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