android-typed-errors

Community

Handle errors with typed results, safely.

Authorsoygabimoreno
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill solves the problem of inconsistent and fragile error handling by providing a consistent typed Result pattern and shared error model that travels cleanly across Android and KMP layers.

Core Features & Use Cases

  • Typed Result wrapper: Use Result<T, E> to represent success and failure with a compile-time error type instead of relying on exceptions.
  • Extension helpers for functional chaining: Use map, mapError, onSuccess, onFailure, fold, and asEmptyResult to transform and react to outcomes without breaking readability.
  • Shared domain error taxonomy: Use DataError (Network and Local) as a common, reusable supertype for data-layer failures.
  • Layered exception philosophy: Catch exceptions at the responsible layer (data/domain/presentation) and map them into typed errors for upper layers.
  • UI mapping contract: Convert user-facing errors into UiText so presentation stays clean and predictable.
  • HTTP safe call helpers: Wrap network calls and map HTTP responses and connectivity/serialization failures into DataError.Network.*.

Quick Start

Apply the android-typed-errors pattern to a repository function by returning Result<T, E> with a domain-specific error type and chaining onSuccess/onFailure to update UI state or show a mapped UiText message.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: android-typed-errors
Download link: https://github.com/soygabimoreno/Los-ANDROIDES/archive/main.zip#android-typed-errors

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.