{"record":{"id":"0fa18f0c280d08b5","repo":"affaan-m/ECC","slug":"errnotfound-0fa18f","errorCode":"ErrNotFound","errorMessage":"resource not found","messagePattern":"resource not found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"skills/golang-patterns/SKILL.md","lineNumber":130,"sourceCode":"}\n```\n\n### Custom Error Types\n\n```go\n// Define domain-specific errors\ntype ValidationError struct {\n    Field   string\n    Message string\n}\n\nfunc (e *ValidationError) Error() string {\n    return fmt.Sprintf(\"validation failed on %s: %s\", e.Field, e.Message)\n}\n\n// Sentinel errors for common cases\nvar (\n    ErrNotFound     = errors.New(\"resource not found\")\n    ErrUnauthorized = errors.New(\"unauthorized\")\n    ErrInvalidInput = errors.New(\"invalid input\")\n)\n```\n\n### Error Checking with errors.Is and errors.As\n\n```go\nfunc HandleError(err error) {\n    // Check for specific error\n    if errors.Is(err, sql.ErrNoRows) {\n        log.Println(\"No records found\")\n        return\n    }\n\n    // Check for error type\n    var validationErr *ValidationError\n    if errors.As(err, &validationErr) {","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/skills/golang-patterns/SKILL.md#L112-L148","documentation":"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.","triggerScenarios":"Triggered when SKILL.md rejects the current invocation: resource not found","commonSituations":"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.","solutions":["Verify the referenced path, id, or resource exists and is spelled correctly, then retry."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}