errs

package
v0.1.34770 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound     = errors.New("not found")
	ErrAuthRequired = errors.New("auth required")
)

Functions

func AuthRequired

func AuthRequired(err error) error

func CheckAuthRequired

func CheckAuthRequired(err error) error

CheckAuthRequired wraps err as AuthRequired if the error message contains "must log in". This consolidates the GQL auth-check pattern used across both api/api.go and api/graphql/client.go.

func NotFound

func NotFound(err error) error

func NotFoundf

func NotFoundf(format string, args ...any) error

Types

type AuthRequiredError

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

func (*AuthRequiredError) Error

func (e *AuthRequiredError) Error() string

func (*AuthRequiredError) Is

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

func (*AuthRequiredError) Unwrap

func (e *AuthRequiredError) Unwrap() error

type NotFoundError

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

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

func (*NotFoundError) Is

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

func (*NotFoundError) Unwrap

func (e *NotFoundError) Unwrap() error

Jump to

Keyboard shortcuts

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