errors

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package errors provides shared error types used across multiple packages. This package exists to avoid import cycles between importer and its subpackages.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFallbackNotConfigured indicates that SABnzbd fallback is not enabled or configured.
	ErrFallbackNotConfigured = &NonRetryableError{
		message: "SABnzbd fallback not configured",
		cause:   nil,
	}

	// ErrArticlesNotFound indicates that one or more NZB segments could not be found on any provider.
	ErrArticlesNotFound = &NonRetryableError{
		message: "The file is incomplete or missing parts. Some segments of this file could not be found on any of the configured Usenet providers. This often happens with older or less popular files.",
		cause:   nil,
	}
)

Sentinel errors for common non-retryable conditions.

Functions

func IsNonRetryable

func IsNonRetryable(err error) bool

IsNonRetryable checks if an error is non-retryable.

func NewNonRetryableError

func NewNonRetryableError(message string, cause error) error

NewNonRetryableError creates a new non-retryable error with a message and optional cause.

func WrapNonRetryable

func WrapNonRetryable(cause error) error

WrapNonRetryable wraps an existing error as non-retryable.

Types

type NonRetryableError

type NonRetryableError struct {
	// contains filtered or unexported fields
}

NonRetryableError represents an error that should not be retried. Operations that encounter this error type should fail immediately without retry attempts.

func (*NonRetryableError) Error

func (e *NonRetryableError) Error() string

Error implements the error interface.

func (*NonRetryableError) Is

func (e *NonRetryableError) Is(target error) bool

Is checks if the target error is a NonRetryableError.

func (*NonRetryableError) Unwrap

func (e *NonRetryableError) Unwrap() error

Unwrap returns the underlying cause error for error unwrapping.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL