brokle-error-handling

Official

Implement robust error handling in Brokle's Go code.

Authorbrokle-ai
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill standardizes error handling across Brokle's Go backend, ensuring consistent error propagation, clear error messages, and proper HTTP response mapping. It reduces debugging time and improves API reliability.

Core Features & Use Cases

  • Three-Layer Pattern: Guides on the "Repository (Domain Errors) → Service (AppErrors) → Handler (HTTP Response)" flow for clean architecture.
  • Domain Alias Pattern: Enforces mandatory professional domain aliases for clean and unambiguous error imports.
  • AppError Constructors: Provides a comprehensive list and usage examples for standardized application-level errors, ensuring consistent error responses.
  • Use Case: A developer is implementing a new service and needs to handle a "resource not found" scenario. This skill shows them how to catch the domain error from the repository, convert it to an appErrors.NewNotFoundError, and ensure the handler automatically returns a 404 Not Found HTTP status.

Quick Start

I am implementing a new project service. Show me how to handle a project not found error from the repository, convert it to an AppError, and ensure the HTTP handler returns the correct status code.

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: brokle-error-handling
Download link: https://github.com/brokle-ai/brokle/archive/main.zip#brokle-error-handling

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 223,000+ vetted skills library on demand.