asyncredux-error-handling
Installation
SKILL.md
Error Handling in AsyncRedux
AsyncRedux provides a comprehensive error handling system with multiple layers: action-level wrapping, global error transformation, and error observation for logging/monitoring.
Error Flow and Action Lifecycle
When errors occur during action execution:
- If
before()throws an error, the reducer doesn't execute and state remains unchanged - If
reduce()throws an error, execution halts without state modification - The
after()method always runs, even when errors occur (like afinallyblock)
Processing order: wrapError() → GlobalWrapError → ErrorObserver
Throwing Errors from Actions
Actions can throw errors using throw. When an error is thrown, the reducer stops and state is not modified: