Error Message Patterns

Design structured error messages with RFC 7807 and HTTP status codes.

Updated Feb 25, 2026
One-click install
npx skills add https://github.com/HermeticOrmus/LibreCopy-Claude-Code --skill error-message-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Error Message Patterns
Source: https://github.com/HermeticOrmus/LibreCopy-Claude-Code/tree/main/plugins/error-messages/skills/error-message-patterns
Command: npx skills add https://github.com/HermeticOrmus/LibreCopy-Claude-Code --skill error-message-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidelines and best practices for designing effective error messages that inform users about what went wrong, why, and how to fix it, improving user experience and reducing support load.

Core Features & Use Cases

  • Structured Error Design: Learn the three-part structure (What, Why, Now What) for clear error communication.
  • Standard Compliance: Understand and implement RFC 7807 Problem Details for consistent API error responses.
  • Code Hierarchy: Design self-documenting, namespaced error codes.
  • HTTP Status Codes: Correctly map errors to appropriate HTTP status codes.
  • User vs. Developer Facing: Differentiate and format errors for different audiences.
  • Localization: Write error strings that are easily translatable.
  • Anti-Patterns: Avoid common pitfalls like leaking internal details or blaming the user.
  • Use Case: When developing an API, ensure all error responses follow RFC 7807, providing clear type, title, and detail fields, along with appropriate HTTP status codes, to guide developers consuming the API.

Quick Start

Explain the three-part structure for error messages.

Frequently Asked Questions about Error Message Patterns

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

FAQPage Schema
How do I structure API error messages for better developer experience?

To structure API error messages effectively, use a three-part format: What went wrong, Why it happened, and Now What to do to fix it. This approach ensures clarity, actionability, and consistency for developers consuming your API.

What is RFC 7807 Problem Details and when should I use it?

RFC 7807 Problem Details is a standardized format for API error responses providing clear type, title, and detail fields. Use it to ensure consistent HTTP status code mapping and structured error communication across your API.

What are common anti-patterns to avoid when designing error messages?

Common error message anti-patterns include leaking internal system details and blaming the user for the failure. Avoid these pitfalls by differentiating user-facing from developer-facing errors and ensuring your strings are ready for localization.

How do I design a self-documenting error code hierarchy?

Design a self-documenting error code hierarchy by using namespaced codes that map to specific failure conditions. This improves error communication consistency and makes it easier for developers to identify and resolve issues.