summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-17 18:13:51 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-17 18:13:51 +0100
commit8cd6190513d8a75974aed257c2bca2234f9b43e9 (patch)
tree1fc6805a298342aa726b284974eaa5949ae0ffd2
parent:bug: fix token checking (diff)
downloadserver-8cd6190513d8a75974aed257c2bca2234f9b43e9.tar.xz
:art: show proper auth error
-rw-r--r--src/middlewares/Authentication.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/middlewares/Authentication.ts b/src/middlewares/Authentication.ts

index 2bb8a124..40ada88e 100644 --- a/src/middlewares/Authentication.ts +++ b/src/middlewares/Authentication.ts
@@ -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)); } }