feat: 修改数据库名称为接收组;增强错误处理,添加错误日志输出
This commit is contained in:
parent
68f2e322a4
commit
d7bd5a9199
@ -4,7 +4,7 @@ import { AppInfoModel } from "../../constant/config"
|
|||||||
import { managePbError } from "../../utils/pbTools"
|
import { managePbError } from "../../utils/pbTools"
|
||||||
import pbClient from "../pbClient"
|
import pbClient from "../pbClient"
|
||||||
|
|
||||||
const DB_NAME = "message_group"
|
const DB_NAME = "receiveGroup"
|
||||||
|
|
||||||
export interface ReceiveGroup {
|
export interface ReceiveGroup {
|
||||||
name: string
|
name: string
|
||||||
|
@ -16,7 +16,8 @@ export const managePbError = async <T>(
|
|||||||
): Promise<T | null> => {
|
): Promise<T | null> => {
|
||||||
try {
|
try {
|
||||||
return await dbFunc()
|
return await dbFunc()
|
||||||
} catch {
|
} catch (err: any) {
|
||||||
|
console.error(err)
|
||||||
return defaultVal || null
|
return defaultVal || null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user