From b9a3412a807ba37b3b50ea812aa9148ec60aea0e Mon Sep 17 00:00:00 2001 From: rpletz Date: Thu, 21 Nov 2024 13:06:35 -0800 Subject: [PATCH] Fix keycloak error message --- app/libs/getUser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/libs/getUser.js b/app/libs/getUser.js index 347eeee25..f01d37031 100644 --- a/app/libs/getUser.js +++ b/app/libs/getUser.js @@ -76,7 +76,7 @@ const getUser = async (req, res) => { } // Check for IPR access if (!decoded.realm_access.roles.includes(nconf.get('keycloak:role'))) { - return res.status(HTTP_STATUS.FORBIDDEN).json({message: 'IPR Access Error'}); + return res.status(HTTP_STATUS.FORBIDDEN).json({message: 'IPR Access Error: Keycloak role missing'}); } const username = decoded.preferred_username; const expiry = decoded.exp;