2024-05-06 03:28:58 +00:00

11 lines
268 B
TypeScript

export const managePb404 = async (dbFunc: Function) => {
try {
return await dbFunc();
} catch (err: any) {
// 没有这个提醒就返回空
if (err?.message === "The requested resource wasn't found.") {
return null;
} else throw err;
}
};