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

Prevent returning null as error in Hapi integration #81

Merged
merged 2 commits into from
May 21, 2019
Merged

Prevent returning null as error in Hapi integration #81

merged 2 commits into from
May 21, 2019

Conversation

aschekatihin
Copy link
Contributor

null is incorrect in this context and causes cryptic error messages in Hapi server. This PR fixes all null errors

@aschekatihin
Copy link
Contributor Author

Also extends #56

@@ -4,7 +4,7 @@ import { JwksClient } from '../JwksClient';
const handleSigningKeyError = (err, cb) => {
// If we didn't find a match, can't provide a key.
if (err && err.name === 'SigningKeyNotFoundError') {
return cb(null, null, null);
return cb(err, null, null);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't reckon you need the if condition because you're doing the same thing in both cases

@damieng damieng requested a review from a team May 21, 2019 17:28
@damieng damieng merged commit 988dc7a 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

4 participants