From 950ab8726f43520814c94ecd76f3c1921067ac14 Mon Sep 17 00:00:00 2001 From: Jeremy Giberson Date: Thu, 7 Sep 2017 09:53:01 -0700 Subject: [PATCH] Don't swallow error message --- src/createAuthScheme.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/createAuthScheme.js b/src/createAuthScheme.js index 2be1f0ac5..8b098df66 100644 --- a/src/createAuthScheme.js +++ b/src/createAuthScheme.js @@ -47,7 +47,8 @@ module.exports = function createAuthScheme(authFun, authorizerOptions, funName, handler = functionHelper.createHandler(funOptions, options); } catch (err) { - return reply(Boom.badImplementation(null, `Error while loading ${authFunName}`)); + debugLog(`create authorization function handler error: ${err}`); + return reply(Boom.badImplementation(null, `Error while loading ${authFunName}: ${err.message}`)); } // Creat the Lambda Context for the Auth function