From edd31cf459e80d1f5d9b21502dffb3d44eff3cc7 Mon Sep 17 00:00:00 2001 From: Gordon <46924906+FGadvancer@users.noreply.github.com> Date: Fri, 19 Jan 2024 14:19:04 +0800 Subject: [PATCH] feat: add msg gateway error. (#12) * optimization: slice sub. * fix: rpc logger add more detail info. * feat: add msg gateway error. --- errs/code.go | 7 ++++--- errs/predefine.go | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/errs/code.go b/errs/code.go index 9f70ab5..947d6e5 100644 --- a/errs/code.go +++ b/errs/code.go @@ -84,9 +84,10 @@ const ( TokenNotExistError = 1507 // 长连接网关错误码. - ConnOverMaxNumLimit = 1601 - ConnArgsErr = 1602 - + ConnOverMaxNumLimit = 1601 + ConnArgsErr = 1602 + PushMsgErr = 1603 + IOSBackgroundPushErr = 1604 // S3错误码. FileUploadedExpiredError = 1701 // 上传过期 ) diff --git a/errs/predefine.go b/errs/predefine.go index f113498..50c5d9a 100644 --- a/errs/predefine.go +++ b/errs/predefine.go @@ -58,7 +58,9 @@ var ( ErrConnOverMaxNumLimit = NewCodeError(ConnOverMaxNumLimit, "ConnOverMaxNumLimit") - ErrConnArgsErr = NewCodeError(ConnArgsErr, "args err, need token, sendID, platformID") + ErrConnArgsErr = NewCodeError(ConnArgsErr, "args err, need token, sendID, platformID") + ErrPushMsgErr = NewCodeError(PushMsgErr, "push msg err") + ErrIOSBackgroundPushErr = NewCodeError(IOSBackgroundPushErr, "ios background push err") ErrFileUploadedExpired = NewCodeError(FileUploadedExpiredError, "FileUploadedExpiredError") )