瀏覽代碼

update db exception convert

ls 2 年之前
父節點
當前提交
970a70dd11
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      db/config.go

+ 6 - 0
db/config.go

@@ -79,6 +79,12 @@ func ReplyToReplyData(reply Reply) *myth.ReplyData {
 			status = myth.ErrUnAuthorized
 		case ErrNotConnect:
 			status = myth.ErrNotFound
+		case ErrExpired:
+			status = myth.ErrNotAllowed
+		case ErrInsufficientBalance:
+			status = myth.ErrNotAllowed
+		case ErrCreditLimit:
+			status = myth.ErrNotAllowed
 		}
 		return myth.ReplyErr(status, reply.LastErr.Error())
 	}