Functional error handling using Dartz and Either.
Scanned 9/8/2026
Install to Claude Code
npx -y skills add ngxtm/devkit --skill error-handling --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Error Handling?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/ngxtm-error-handling)More formats (shields.io, HTML) on the badges page.
---
name: Flutter Error Handling
description: Functional error handling using Dartz and Either.
metadata:
labels: [error-handling, dartz, functional]
triggers:
files: ['lib/domain/**', 'lib/infrastructure/**']
keywords: [Either, fold, Left, Right, Failure, dartz]
---
# Error Handling
## **Priority: P1 (HIGH)**
Standardized functional error handling using `dartz` and `freezed` failures.
## Implementation Guidelines
- **Either Pattern**: Return `Either<Failure, T>` from repositories. No exceptions in UI/BLoC.
- **Failures**: Define domain-specific failures using `@freezed` unions.
- **Mapping**: Infrastructure catches `Exception` and returns `Left(Failure)`.
- **Consumption**: Use `.fold(failure, success)` in BLoC to emit corresponding states.
- **Typed Errors**: Use `left(Failure())` and `right(Value())` from `Dartz`.
## Reference & Examples
For Failure definitions and API error mapping:
See [references/REFERENCE.md](references/REFERENCE.md).
## Related Topics
layer-based-clean-architecture | bloc-state-management
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.