affaan-m/ECC · error

ErrNotFound

ErrNotFound

Error message

resource not found

What it means

Sentinel error example in the golang-patterns skill documentation: ErrNotFound is the idiomatic Go sentinel for a missing resource, compared with errors.Is at call sites. Mirrored in the es and ja-JP translations; documentation code, not a runtime throw site.

Source

Thrown at skills/golang-patterns/SKILL.md:130

}
```

### Custom Error Types

```go
// Define domain-specific errors
type ValidationError struct {
    Field   string
    Message string
}

func (e *ValidationError) Error() string {
    return fmt.Sprintf("validation failed on %s: %s", e.Field, e.Message)
}

// Sentinel errors for common cases
var (
    ErrNotFound     = errors.New("resource not found")
    ErrUnauthorized = errors.New("unauthorized")
    ErrInvalidInput = errors.New("invalid input")
)
```

### Error Checking with errors.Is and errors.As

```go
func HandleError(err error) {
    // Check for specific error
    if errors.Is(err, sql.ErrNoRows) {
        log.Println("No records found")
        return
    }

    // Check for error type
    var validationErr *ValidationError
    if errors.As(err, &validationErr) {

View on GitHub (pinned to 06c5e118c4)

Solutions

  1. Verify the referenced path, id, or resource exists and is spelled correctly, then retry.
Defensive patterns

Strategy: validation

When it happens

Trigger: Triggered when SKILL.md rejects the current invocation: resource not found

Common situations: Occurs while running skills/golang-patterns/SKILL.md with invalid arguments, missing flags, or a failing external dependency; the guard at skills/golang-patterns/SKILL.md:130 aborts the command with this message.


AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18). Data as JSON: /api/errors/0fa18f0c280d08b5. Report an issue: GitHub.