The errorutil package provides shared helpers for classifying and inspecting errors returned by the GitHub API and gh CLI.
Overview
This package currently exposes focused helpers for identifying common error categories used across pkg/cli and pkg/parser, including "not found" (404) responses.
Public API
Functions
Function
Signature
Description
IsNotFoundError
func(err error) bool
Returns true when err indicates a "not found" condition by matching case-insensitive 404 or not found text; returns false for nil and non-matching errors
IsNotFoundError reports whether err represents an HTTP 404 / "not found" response.
It returns false when err is nil.
The check is case-insensitive and matches both the numeric literal "404" and
the phrase "not found", which covers all known forms returned by the GitHub API,
the gh CLI, and the go-gh library.