asyncredux-user-exceptions

Convert AsyncRedux action errors to UserException and display error dialogs.

238|39|Updated Aug 4, 2019
One-click install
npx skills add https://github.com/marcglasberg/async_redux --skill asyncredux-user-exceptions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: asyncredux-user-exceptions
Source: https://github.com/marcglasberg/async_redux/tree/main/.claude/skills/asyncredux-user-exceptions
Command: npx skills add https://github.com/marcglasberg/async_redux --skill asyncredux-user-exceptions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AsyncRedux apps often face user-facing errors that should be communicated to users without crashing the app. This skill provides a consistent approach using UserException, UserExceptionDialog, and UserExceptionAction to separate user-facing issues from developer bugs.

Core Features & Use Cases

  • Throw UserException from Actions to surface user-facing problems.
  • Convert unexpected errors to UserException with addCause for friendly messages.
  • Set up UserExceptionDialog to display errors and customize via onShowUserExceptionDialog.
  • Use UserExceptionAction to show non-interrupting errors during an action.
  • Optional: GlobalWrapError and error queue for centralized error handling and testing.

Quick Start

Wrap your app with UserExceptionDialog, dispatch UserException in actions for user-facing errors, and customize the dialog with onShowUserExceptionDialog as needed.

Frequently Asked Questions about asyncredux-user-exceptions

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

FAQPage Schema
How do I handle user-facing errors in Flutter without crashing the app?

To handle user-facing errors in Flutter without crashing the app, wrap your app with UserExceptionDialog and dispatch UserException from AsyncRedux actions to surface friendly messages. This separates user-facing issues from developer bugs.

How do I display error dialogs for AsyncRedux actions in Flutter?

To display error dialogs for AsyncRedux actions, wrap your app with UserExceptionDialog and dispatch UserException instances. You can customize the dialog display using the onShowUserExceptionDialog callback.

How do I convert unexpected errors to user-friendly messages in AsyncRedux?

To convert unexpected errors to user-friendly messages in AsyncRedux, use addCause to transform them into UserException instances. This allows you to present friendly UI messages while retaining the original error context.

Can I show non-interrupting errors during an AsyncRedux action execution?

Yes, you can show non-interrupting errors during an AsyncRedux action by using UserExceptionAction. This allows the action execution to continue while still notifying the user of the problem.

Does AsyncRedux support centralized error handling for testing?

Yes, AsyncRedux supports centralized error handling for testing through optional GlobalWrapError and an error queue. This setup allows you to manage errors globally and verify error-handling behavior during tests.