From 69727e78df977e06e3c35f6d235ff63f529839ae Mon Sep 17 00:00:00 2001 From: Faruk AYDIN Date: Wed, 14 Feb 2024 13:06:29 +0100 Subject: [PATCH] fix: Throw not found error for authentication --- packages/backend/src/helpers/authentication.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/helpers/authentication.js b/packages/backend/src/helpers/authentication.js index 010856ee..42708a0b 100644 --- a/packages/backend/src/helpers/authentication.js +++ b/packages/backend/src/helpers/authentication.js @@ -20,7 +20,8 @@ export const isAuthenticated = async (_parent, _args, req) => { .withGraphFetched({ role: true, permissions: true, - }); + }) + .throwIfNotFound(); return true; } catch (error) {