completionId: cgen-ff1ae74cb36c4487878d061dce0da599
cgen-ff1ae74cb36c4487878d061dce0da599
This commit is contained in:
parent
2da5375845
commit
3ccfa6d336
1 changed files with 16 additions and 1 deletions
|
|
@ -134,8 +134,23 @@ export default async function handler(req: any, res: any) {
|
|||
console.error(
|
||||
"[Discord OAuth] Auth user creation failed:",
|
||||
authError,
|
||||
{
|
||||
email: discordUser.email,
|
||||
username: discordUser.username,
|
||||
message: authError?.message,
|
||||
status: authError?.status,
|
||||
},
|
||||
);
|
||||
return res.redirect("/login?error=auth_create");
|
||||
return res
|
||||
.status(500)
|
||||
.json({
|
||||
error: "auth_create",
|
||||
message: authError?.message || "Failed to create auth user",
|
||||
details: {
|
||||
email: discordUser.email,
|
||||
error_code: authError?.code,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
userId = authData.user.id;
|
||||
|
|
|
|||
Loading…
Reference in a new issue