{"modulePath":"github.com/mjun0812/github-metrics","version":"v1.2.13","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package errors\n\nPackage errors defines the typed error model for the github-metrics project. Each type carries one structured field describing the source of the problem (input name, missing resource, denied reason, ...) so that callers can branch with errors.As without parsing strings.\n\n## Variables\n\n```go\nvar (\n\tIs = errors.Is\n\tAs = errors.As\n)\n```\nRe-export the standard library helpers so callers can rely on a single import for typed-error handling.\n\n## Functions\n\n```go\nfunc NewForbiddenError(reason string, cause error) error\n```\nNewForbiddenError returns a \\*ForbiddenError tagged with a short machine-readable reason code.\n\n```go\nfunc NewInputError(field string, cause error) error\n```\nNewInputError returns an \\*InputError describing a malformed or unexpected input value.\n\n```go\nfunc NewNotFoundError(resource string, cause error) error\n```\nNewNotFoundError returns a \\*NotFoundError keyed by the missing resource identifier.\n\n```go\nfunc NewRetryableError(cause error) error\n```\nNewRetryableError wraps a transient failure that callers should retry. Also used by the plugin runner when a panic is recovered.\n\n```go\nfunc NewUnsupportedFormatError(format string, cause error) error\n```\nNewUnsupportedFormatError returns an \\*UnsupportedFormatError tagged with the unsupported format string.\n\n## Types\n\n```go\ntype ForbiddenError struct {\n\tReason string\n\tCause  error\n}\n```\nForbiddenError reports that the operation is denied (auth scope, allow-list, rate exhaustion, ...). Reason carries a short machine-readable code.\n\n```go\nfunc (e *ForbiddenError) Error() string\n```\n\n```go\nfunc (e *ForbiddenError) Unwrap() error\n```\n\n```go\ntype InputError struct {\n\tField string\n\tCause error\n}\n```\nInputError reports that an input value failed validation or could not be normalized. Field identifies which input (typically the metadata.yml key).\n\n```go\nfunc (e *InputError) Error() string\n```\n\n```go\nfunc (e *InputError) Unwrap() error\n```\n\n```go\ntype NotFoundError struct {\n\tResource string\n\tCause    error\n}\n```\nNotFoundError reports that a requested resource (login, template, plugin) was not present.\n\n```go\nfunc (e *NotFoundError) Error() string\n```\n\n```go\nfunc (e *NotFoundError) Unwrap() error\n```\n\n```go\ntype RetryableError struct {\n\tCause error\n}\n```\nRetryableError wraps a transient failure that callers should retry (or that the plugin runner has already recovered from a panic).\n\n```go\nfunc (e *RetryableError) Error() string\n```\n\n```go\nfunc (e *RetryableError) Unwrap() error\n```\n\n```go\ntype UnsupportedFormatError struct {\n\tFormat string\n\tCause  error\n}\n```\nUnsupportedFormatError reports that a requested rendering or input format is not supported by the active template / plugin.\n\n```go\nfunc (e *UnsupportedFormatError) Error() string\n```\n\n```go\nfunc (e *UnsupportedFormatError) Unwrap() error\n```\n\n","path":"github.com/mjun0812/github-metrics/internal/errors","name":"errors","synopsis":"Package errors defines the typed error model for the github-metrics project.","isRedistributable":true}
