Documentation
¶
Overview ¶
internal/errors/errors.go
Package errors defines reusable error types for Aether. Using structured errors allows callers to inspect and react to specific failure modes, such as configuration issues, HTTP failures, or robots.txt violations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
Kind Kind // high-level category of the error
Msg string // descriptive message
Err error // underlying error, if any
}
Error is Aether's structured error type.
It wraps a human-readable message and a Kind identifier so that callers can distinguish between different failure classes programmatically.
type Kind ¶
type Kind string
Kind represents a high-level category of error.
Grouping errors by Kind makes it easier for callers to implement policies such as "retry on HTTP errors, but fail fast on robots.txt".
const ( // KindUnknown represents an unspecified error category. KindUnknown Kind = "unknown" // KindConfig indicates a configuration-related error. KindConfig Kind = "config" // KindHTTP indicates an HTTP-related error. KindHTTP Kind = "http" // KindRobots indicates a robots.txt-related error. KindRobots Kind = "robots" // KindParsing indicates an error while parsing HTML, RSS, etc. KindParsing Kind = "parsing" )
Click to show internal directories.
Click to hide internal directories.