Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw errors when hapi integration fails #56

Merged
merged 2 commits into from
May 21, 2019
Merged

Conversation

jonpacker
Copy link
Contributor

At the moment the hapi integration fails by sending null as the error object, which results in this cryptic an unhelpful error from hapi:

[start] Debug: internal, implementation, error
    Error: Cannot throw non-error object
    at module.exports.internals.Manager.execute (.../node_modules/hapi/lib/toolkit.js:44:33)
    at process._tickCallback (internal/process/next_tick.js:68:7)

I suspect the most often case for this happening is ours, when an HS256-signed JWT is being sent. This pull request adds a couple of error messages so that the user gets some information about what is actually going wrong. I kind of guessed about what they say, my domain knowledge here is not great. Feel free to make them more informative.

@damieng damieng merged commit 216adea into auth0:master May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants