errors

package
v1.4.27 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package errors provides error codes and types for the TK SDK.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTkError

func NewTkError(code ErroCode) error

NewTkError 创建途刻错误

func NewTkErrorWithMessage

func NewTkErrorWithMessage(code ErroCode, message string) error

NewTkErrorWithMessage 创建带消息的途刻错误

Types

type ErroCode

type ErroCode int

ErroCode 错误代码类型

const (
	// ConfigIsNull 配置为空错误
	ConfigIsNull ErroCode = 10001
	// ParamError 参数错误
	ParamError            ErroCode = 10002
	HTTPError             ErroCode = 10003 // nolint: revive // backward compatibility
	GetTokenError         ErroCode = 10004
	ConfigAppIDIsNull     ErroCode = 10005 // nolint: revive // backward compatibility
	ConfigAppSecretIsNull ErroCode = 10006
)

type TkError

type TkError struct {
	Code    ErroCode
	Message string
}

TkError 途刻SDK错误结构

func (*TkError) Error

func (err *TkError) Error() string

Jump to

Keyboard shortcuts

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