在 fast-forward 到 origin/main 后解决 music logic/repo 冲突,SQL 与模型统一 t_* 表名;Makefile 修正 golangci-lint 变量并令 test/deploy 依赖 lint;补齐 admin/transport 等 lint 修复与 music logic 单测以满足覆盖率门禁。 Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
1.5 KiB
Go
30 lines
1.5 KiB
Go
package errs
|
|
|
|
// Sentinel AppErrors. Code is the envelope code shared by HTTP and TCP.
|
|
var (
|
|
OK = NewError("0", "ok", "")
|
|
ErrInvalidArgument = NewError("40001", "invalid argument", "")
|
|
ErrFrameTooLarge = NewError("40002", "frame too large", "")
|
|
ErrInvalidFrame = NewError("40003", "invalid frame", "")
|
|
ErrProxyHeader = NewError("40004", "invalid proxy protocol header", "")
|
|
ErrUnauthorized = NewError("40101", "unauthorized", "")
|
|
ErrNotAuthenticated = NewError("40102", "not authenticated", "")
|
|
ErrVerifyCodeInvalid = NewError("40103", "verification code invalid", "")
|
|
ErrForbidden = NewError("40301", "forbidden", "")
|
|
ErrNotFound = NewError("40401", "not found", "")
|
|
ErrMediaExpired = NewError("40402", "media expired", "")
|
|
ErrDuplicate = NewError("40901", "duplicate", "")
|
|
ErrBusy = NewError("42901", "busy", "")
|
|
ErrRateLimited = NewError("42902", "rate limited", "")
|
|
ErrOutboundDropped = NewError("42903", "outbound dropped", "")
|
|
ErrClosed = NewError("49901", "connection closed", "")
|
|
ErrInner = NewErrorPrint("50001", "internal", "")
|
|
ErrOperatFail = NewErrorPrint("50002", "operation failed", "")
|
|
ErrClockRewind = NewErrorPrint("50003", "snowflake clock rewind", "")
|
|
ErrAvailable = NewErrorPrint("50301", "unavailable", "")
|
|
ErrTimeout = NewErrorPrint("50401", "timeout", "")
|
|
)
|
|
|
|
// ErrInternal is an alias of ErrInner.
|
|
var ErrInternal = ErrInner
|