Documentation
¶
Index ¶
- Variables
- func Cause(err error) error
- func Code(err error) (int32, bool)
- func CodeError(code int32, err string) error
- func Errorf(format string, args ...interface{}) error
- func InvalidArgumentError(argument string, validationMsg string) error
- func MetaError(code int32, err string) twirp.Error
- func Wrap(err error, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var NotLoginError = twirp.NewError(twirp.Unauthenticated, "must login")
NotLoginError 错误未登录
View Source
var PermissionDeniedError = twirp.NewError(twirp.PermissionDenied, "permission denied")
PermissionDeniedError 权限不够
View Source
var TokenExpired error = twirp.NewError(twirp.DeadlineExceeded, "Token is expired")
token过期
View Source
var TokenInvalid error = twirp.NewError(twirp.InvalidArgument, "Couldn't handle this token:")
无法处理token
View Source
var TokenMalformed error = twirp.NewError(twirp.InvalidArgument, "That's not even a token")
不是token
View Source
var TokenNotValidYet error = twirp.NewError(twirp.InvalidArgument, "Token not active yet")
token未激活
Functions ¶
func InvalidArgumentError ¶
InvalidArgumentError 参数错误,400
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.