🎨 show proper auth error

This commit is contained in:
Flam3rboy 2021-02-17 18:13:51 +01:00
parent eca7b96de3
commit 8cd6190513

View File

@ -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));
}
}