{"enrichment":{"faq":[{"a":"error-handling-debugging teaches custom error types using thiserror and anyhow for building exception chains in Tauri. Define Result types wrapping your error enum, use the ? operator for propagation, and serialize errors as JSON responses to the frontend. Tauri's command macro automatically converts Rust errors into TypeScript-compatible responses, letting you handle failures gracefully in React components.","q":"How do you handle errors in Rust Tauri applications?"},{"a":"error-handling-debugging covers try-catch patterns with async/await, proper error typing to avoid 'unknown' types, and discriminated unions for structured error responses. Wrap async operations in try blocks, catch specific error conditions, and propagate meaningful context. Use type guards to narrow error types before accessing properties, preventing runtime crashes from unexpected error shapes.","q":"What are TypeScript error handling best practices for async code?"},{"a":"error-handling-debugging addresses debugging Tauri command failures by enabling structured logging with tracing and instrumentation. Check type mismatches in command signatures\u2014Specta attributes must match Rust types exactly. Use console logs on the frontend to inspect serialized responses, enable Tauri's debug mode, and validate JSON payloads. Database errors like 'locked' typically indicate concurrent access; use connection pooling and retry logic with exponential backoff.","q":"How do you debug Tauri command failures and deserialization errors?"},{"a":"error-handling-debugging demonstrates rust tracing setup using the tracing crate with subscribers for capturing instrumentation events. Initialize a tracing subscriber in your main function, use #[instrument] macros on functions to auto-log entry/exit, and emit span events for diagnostics. Combine with anyhow for error chains that preserve context through the call stack, making failures easier to trace in production logs.","q":"How do you set up structured logging and tracing in Rust?"},{"a":"error-handling-debugging covers React error boundary implementation using class components with componentDidCatch lifecycle methods. Wrap risky subtrees to catch rendering errors and display fallback UI. Pair with useEffect cleanup patterns to prevent memory leaks from subscriptions, and use dependency arrays correctly to avoid hook warnings. Combine with Tauri command error responses for comprehensive frontend error handling.","q":"What's the proper way to implement React error boundaries?"},{"a":"error-handling-debugging teaches retry logic by wrapping async operations in loops with exponential backoff delays. Use tokio::time::sleep to introduce delays between attempts, calculate backoff as base_delay * 2^attempt, and set max retry counts to prevent infinite loops. Combine with custom error types to distinguish retryable errors from permanent failures, enabling graceful degradation when services are temporarily unavailable.","q":"How do you implement retry logic with exponential backoff in Rust?"}],"shadow_tags":["exception-handling","diagnostic-logging","resilience-patterns","type-safety","desktop-debugging","recovery-strategies","async-error-flow","instrumentation-tracing"],"summary_rewrite":"Master error handling across Rust and TypeScript in Tauri applications. Learn custom error types, exception chains, API response patterns, and debugging techniques using tracing and structured logging. Covers database errors, command failures, and React error boundaries."},"files":[{"bytes":13870,"path":".claude/skills/error-handling-debugging/SKILL.md","sha256":"3f791c6c8a7b0e951d808bd6fe1af3d36dd61df2a9c4ce251577d19efa026bcd","url":"https://skillfed.io/files/cacr92/WeReply/error-handling-debugging/9be4b6ef/SKILL.md"}],"id":"cacr92/WeReply/error-handling-debugging","links":{"html":"https://skillfed.io/cacr92/WeReply/error-handling-debugging","md":"https://skillfed.io/cacr92/WeReply/error-handling-debugging.md","repo":"https://github.com/cacr92/WeReply"},"meta":{"agents_supported":["claude-code","codex","cursor"],"first_seen":"2026-07-28","forks":3,"language":"Python","last_updated":"2026-01-30","license":"MIT","name":"error-handling-debugging","publisher":"cacr92","stars":4},"relations":{"similar":[{"id":"cacr92/WeReply/debugging"},{"id":"cacr92/WeReply/api-design"},{"id":"cacr92/WeReply/security-review"},{"id":"cacr92/WeReply/tauri-development"},{"id":"bkywksj/knowledge-base/error-handler"},{"id":"cacr92/WeReply/code-review"},{"id":"cacr92/WeReply/deepseek-integration"},{"id":"cacr92/WeReply/react-typescript-development"},{"id":"cacr92/WeReply/testing-strategy"},{"id":"cacr92/WeReply/tdd-workflow"}]},"slug":{"owner":"cacr92","repo":"WeReply","skill":"error-handling-debugging"},"version":"9be4b6ef"}
