errors

package
v0.0.0-...-e89c34c Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadRequest          = errors.New(400, "INVALID_ARGS", "invalid args")
	ErrRefreshTokenExpired = errors.New(400, "REFRESH_TOKEN_EXPIRED", "请重新登录")
	ErrAccessTokenExpired  = errors.New(400, "ACCESS_TOKEN_EXPIRED", "token已经过期")
	ErrLogin               = errors.New(401, "UNAUTHORIZED", "请授权登录")
	ErrForbidden           = errors.New(403, "FORBIDDEN", "权限不够")
	ErrResourceNotFound    = errors.New(404, "RESOURCE_NOT_FOUND", "资源不存在")
	ErrInternalServer      = errors.New(500, "INTERNAL_SERVER_ERROR", "服务内部错误")
)

Functions

func WithMessage

func WithMessage(e *errors.Error, msg string) *errors.Error

func WithReason

func WithReason(e *errors.Error, in string) *errors.Error

Types

This section is empty.

Jump to

Keyboard shortcuts

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