mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 12:42:44 +01:00
🎨 show proper auth error
This commit is contained in:
parent
eca7b96de3
commit
8cd6190513
@ -25,6 +25,6 @@ export async function Authentication(req: Request, res: Response, next: NextFunc
|
||||
req.userid = decoded.id;
|
||||
return next();
|
||||
} catch (error) {
|
||||
return next(error);
|
||||
return next(new HTTPError(error.toString(), 400));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user