Skip to content

Commit 077cd59

Browse files
authored
🐛 fix: throws error in nextauth db adapter (#3390)
1 parent ae0711e commit 077cd59

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/libs/next-auth/adapter/index.ts

+3-7
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,9 @@ export function LobeNextAuthDbAdapter(serverDB: NeonDatabase<typeof schema>): Ad
145145
},
146146

147147
async getUser(id): Promise<AdapterUser | null> {
148-
try {
149-
const lobeUser = await UserModel.findById(id);
150-
if (!lobeUser) return null;
151-
return mapLobeUserToAdapterUser(lobeUser);
152-
} catch {
153-
return null;
154-
}
148+
const lobeUser = await UserModel.findById(id);
149+
if (!lobeUser) return null;
150+
return mapLobeUserToAdapterUser(lobeUser);
155151
},
156152

157153
async getUserByAccount(account): Promise<AdapterUser | null> {

0 commit comments

Comments
 (0)