error-messages

Featured

Write consistent, actionable validation error messages in gh-aw.

AI & Automation 5,125 stars 539 forks Updated today MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Error Message Style Guide Use this format for gh-aw validation errors. Keep messages clear, actionable, and example-driven. ## Error Message Template ``` [what's wrong]. [what's expected]. [example of correct usage] ``` Make each error message answer three questions: 1. **What's wrong?** - Clearly state the validation error 2. **What's expected?** - Explain the valid format or values 3. **How to fix it?** - Provide a concrete example of correct usage ## Constructive Language Avoid standalone negative wording. Pair it with expected behavior and a concrete fix. | Avoid only-negative wording | Prefer constructive wording | |---|---| | `invalid` | `expected` + valid format/options | | `cannot` | `requires` + precondition | | `must` | `should` + example | | `failed` | action context + recovery step | ❌ `invalid repo format: %s` ✅ `invalid repo format '%s' — expected 'owner/repo' format (for example: 'github/gh-aw')` ❌ `not in a git repository` ✅ `not in a git repository — run 'git init' or 'cd' to a git repository` ## When to use `NewValidationError` vs `fmt.Errorf` - Use `NewValidationError(field, value, reason, suggestion)` in `*_validation.go` logic. - Use `field` for the exact config path - Use `reason` for what failed - Use `suggestion` for an actionable fix with an example - Use `fmt.Errorf` for operational/wrapping errors (`%w`) where you are propagating a lower-level failure with context. - Avoid generic wrappers like `fmt.Errorf("failed to X: %w", e...

Details

Author
github
Repository
github/gh-aw
Created
1 years ago
Last Updated
today
Language
Go
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

awesome-error-standards

Applies consistent error handling and user-facing messages: typed errors, operational-vs-programmer classification, API error envelopes, HTTP status mapping. Use when adding or refactoring error handling, designing an API error contract, reviewing failure paths, or 'обработка ошибок'. Do not use for log format, levels or PII redaction (awesome-logging-standards).

8 Updated today
khasky
AI & Automation Listed

go-error-handling

Use when writing, reviewing, or refactoring error handling in Go — wrapping with %w, sentinel vs typed errors, errors.Is/errors.As, when panic is acceptable, error message style, and mapping domain errors to transport codes (HTTP/gRPC). Triggers on any Go code that returns, wraps, logs, or inspects errors.

0 Updated 1 months ago
Markuysa
API & Backend Listed

designing-backend-error-messages

Designs backend API error contracts with a REST-default approach using RFC 9457 Problem Details, stable machine-readable codes, retry semantics, validation error payloads, observability, and security-safe messaging. Reviews existing error handling against a binary rubric and proposes concrete fixes. Produces optional artifacts such as errors.yaml entries, Problem Details examples, OpenAPI fragments, and runbook templates. Use when creating or revising backend error responses, auditing API error quality, mapping status/code behavior, or documenting error handling for REST, gRPC, GraphQL, and async services.

0 Updated 4 weeks ago
msewell