errors

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeOfflineIllegalLink = 10004
	CodeOfflineTaskExists  = 10008
)
View Source
const (
	ShareClosed = 4100000

	ShareReceiveCodeIncorrect = 4100008

	ShareCanceled1 = 4100009
	ShareCanceled2 = 4100010
	ShareCanceled3 = 4100018
	ShareCanceled4 = 4100033

	ShareRequireReceiveCode = 4100012
)
View Source
const (
	CodeFileOrderNotSupported = 20130827
)

Variables

View Source
var (
	ErrNotLogin = errors.New("user not login")

	ErrCaptchaRequired = errors.New("please resolve captcha")

	ErrOfflineInvalidLink = errors.New("invalid download link")

	ErrIPAbnormal           = errors.New("ip abnormal")
	ErrPasswordIncorrect    = errors.New("password incorrect")
	ErrLoginTwoStepVerify   = errors.New("requires two-step verification")
	ErrAccountNotBindMobile = errors.New("account not binds mobile")
	ErrCredentialInvalid    = errors.New("credential invalid")
	ErrSessionExited        = errors.New("session exited")

	ErrQrcodeExpired = errors.New("qrcode expired")
	ErrGetFailed     = errors.New("get failed")

	// ErrUnexpected is the fall-back error whose code is not handled.
	ErrUnexpected = errors.New("unexpected error")

	// ErrExist means an item which you want to create is already existed.
	ErrExist = errors.New("target already exists")
	// ErrNotExist means an item which you find is not existed.
	ErrNotExist = errors.New("target does not exist")

	ErrInvalidOperation = errors.New("invalid operation")

	ErrInvalidParameters = errors.New("invalid parameters")

	ErrUploadDisabled = errors.New("upload function is disabled")

	ErrUploadNothing = errors.New("nothing ot upload")

	ErrUploadTooLarge = errors.New("upload reach the limit")

	ErrInitUploadUnknowStatus = errors.New("unknown status from initupload")

	ErrImportDirectory = errors.New("can not import directory")

	ErrDownloadEmpty = errors.New("can not get download URL")

	ErrDownloadDirectory = errors.New("can not download directory")

	ErrVideoNotReady = errors.New("video is not ready")

	ErrEmptyList = errors.New("list is empty")
)
View Source
var ErrInvalidResp = errors.New("invalid resp")
View Source
var (
	ErrUnsupportedPlatform = errors.New("unsupported platform")
)

Functions

func Get

func Get(code int, message string) error

Types

type ApiError added in v0.7.1

type ApiError struct {
	Code    int
	Message string
}

func (*ApiError) Error added in v0.7.1

func (e *ApiError) Error() string

type FileOrderInvalidError added in v0.7.1

type FileOrderInvalidError struct {
	Order string
	Asc   int
}

func (*FileOrderInvalidError) Error added in v0.7.1

func (e *FileOrderInvalidError) Error() string

Jump to

Keyboard shortcuts

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