error-handler

Implement unified Rust and React error handling for Tauri apps.

309|58|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/bkywksj/knowledge-base --skill error-handler-bkywksj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handler
Source: https://github.com/bkywksj/knowledge-base/tree/main/.claude/skills/error-handler
Command: npx skills add https://github.com/bkywksj/knowledge-base --skill error-handler-bkywksj

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill establishes a unified error handling strategy for Tauri applications, aligning Rust backend errors with frontend error reporting to prevent crashes and provide consistent user feedback.

Core Features & Use Cases

  • Unified error type across backend (Rust) and frontend (React) to standardize error messaging.
  • Three-layer error propagation (Database/Service/Command) with safe conversions and explicit NotFound/InvalidInput variants.
  • Safe concurrency handling using map_err to convert Mutex poisoning into AppError.
  • React-side error management with an ErrorBoundary, try-catch around tauri.invoke, and a global error handling hook.
  • Practical scenarios include retrieving configuration, reading files, and propagating meaningful errors to the UI.

Quick Start

Describe and implement a robust end-to-end error handling workflow for a Tauri app, covering Rust error types, IPC error mapping, and React error recovery.

Frequently Asked Questions about error-handler

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle errors across Tauri IPC between Rust and React?

Handling Tauri IPC errors requires mapping Rust backend errors to structured types and catching them via try-catch around tauri.invoke in React. This skill unifies both layers with an AppError type and a global error hook for consistent user feedback.

What is the best way to structure error propagation in a Tauri Rust backend?

Error propagation in a Tauri Rust backend is best structured in three layers: Database, Service, and Command. This skill implements safe conversions with explicit NotFound and InvalidInput variants to ensure meaningful errors reach the frontend.

How does Tauri handle Mutex poisoning during concurrency?

Tauri handles Mutex poisoning by safely converting the poisoning error into a structured AppError type using map_err. This prevents backend crashes and ensures the React frontend receives a manageable application error.

Can I use a React ErrorBoundary to catch Tauri invoke errors?

Yes, you can use a React ErrorBoundary to catch Tauri invoke errors. This skill combines an ErrorBoundary with try-catch blocks around tauri.invoke and global error hooks to manage exceptions and provide user-friendly feedback.

Why do my Tauri app crashes happen when reading files or configurations fails?

Tauri app crashes during file or configuration reading often happen because backend errors lack structured propagation. This skill solves it by implementing a unified AppError type that safely propagates meaningful errors to the React UI.