diff --git a/db/receiveGroup/index.ts b/db/receiveGroup/index.ts index 0d03a03..5086b3e 100644 --- a/db/receiveGroup/index.ts +++ b/db/receiveGroup/index.ts @@ -4,7 +4,7 @@ import { AppInfoModel } from "../../constant/config" import { managePbError } from "../../utils/pbTools" import pbClient from "../pbClient" -const DB_NAME = "message_group" +const DB_NAME = "receiveGroup" export interface ReceiveGroup { name: string diff --git a/utils/pbTools.ts b/utils/pbTools.ts index 434d3ef..007dd90 100644 --- a/utils/pbTools.ts +++ b/utils/pbTools.ts @@ -16,7 +16,8 @@ export const managePbError = async ( ): Promise => { try { return await dbFunc() - } catch { + } catch (err: any) { + console.error(err) return defaultVal || null } }