Skip to content

Commit

Permalink
Merge pull request #302 from jeremygiberson/authfunc-error
Browse files Browse the repository at this point in the history
Don't swallow error message when creating auth function handler
  • Loading branch information
dherault authored Sep 18, 2017
2 parents d1f168c + 950ab87 commit 2622ba3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/createAuthScheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2622ba3

Please sign in to comment.