errs

package
v4.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotImplement = errors.New("not implement")
	NotSupport   = errors.New("not support")
	RelativePath = errors.New("using relative path is not allowed")

	UploadNotSupported = errors.New("upload not supported")
	MetaNotFound       = errors.New("meta not found")
	StorageNotFound    = errors.New("storage not found")
	StorageNotInit     = errors.New("storage not init")
	StreamIncomplete   = errors.New("upload/download stream incomplete, possible network issue")
	StreamPeekFail     = errors.New("StreamPeekFail")

	UnknownArchiveFormat      = errors.New("unknown archive format")
	WrongArchivePassword      = errors.New("wrong archive password")
	DriverExtractNotSupported = errors.New("driver extraction not supported")

	WrongShareCode  = errors.New("wrong share code")
	InvalidSharing  = errors.New("invalid sharing")
	SharingNotFound = errors.New("sharing not found")
)
View Source
var (
	ObjectNotFound      = errors.New("object not found")
	ObjectAlreadyExists = errors.New("object already exists")
	NotFolder           = errors.New("not a folder")
	NotFile             = errors.New("not a file")
)
View Source
var (
	SearchNotAvailable  = fmt.Errorf("search not available")
	BuildIndexIsRunning = fmt.Errorf("build index is running, please try later")
)
View Source
var (
	EmptyUsername      = errors.New("username is empty")
	EmptyPassword      = errors.New("password is empty")
	WrongPassword      = errors.New("password is incorrect")
	DeleteAdminOrGuest = errors.New("cannot delete admin or guest")
)
View Source
var (
	EmptyToken = errors.New("empty token")
)
View Source
var (
	PermissionDenied = errors.New("permission denied")
)

Functions

func IsNotFoundError

func IsNotFoundError(err error) bool

func IsNotImplementError added in v4.1.4

func IsNotImplementError(err error) bool

func IsNotSupportError

func IsNotSupportError(err error) bool

func IsObjectNotFound

func IsObjectNotFound(err error) bool

func NewErr

func NewErr(err error, format string, a ...any) error

NewErr wrap constant error with an extra message use errors.Is(err1, StorageNotFound) to check if err belongs to any internal error

func UnwrapOrSelf added in v4.1.4

func UnwrapOrSelf(err error) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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