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

Adding legacy error handling for co/auth endpoint #685

Merged
merged 2 commits into from
Mar 2, 2018

Conversation

luisrudge
Copy link
Contributor

No description provided.

Copy link
Contributor

@joshcanhelp joshcanhelp left a comment

Choose a reason for hiding this comment

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

Cleaner than I thought it would look 👍 a few questions/comments

@@ -166,7 +166,9 @@ describe('auth0.WebAuth.crossOriginAuthentication', function() {
error_description: 'a huge error string'
},
code: 'any error',
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably be a machine_name without spaces

@@ -166,7 +166,9 @@ describe('auth0.WebAuth.crossOriginAuthentication', function() {
error_description: 'a huge error string'
},
code: 'any error',
description: 'a huge error string'
description: 'a huge error string',
error: 'any error',
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably be a machine_name without spaces

Copy link
Contributor Author

Choose a reason for hiding this comment

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

doesn't really matter for the tests though..

@@ -42,7 +42,10 @@ function wrapCallback(cb, options) {
if (err.err) {
err = err.err;
}

if (options.forceLegacyError) {
errObj.error = err.error;
Copy link
Contributor

Choose a reason for hiding this comment

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

This means that it's possible for errObj.code !== errObj.error ... is that intended? Maybe this should fall after where err.code and errObj.description are set and set them as equal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense. pushed a change

Copy link
Contributor

@joshcanhelp joshcanhelp left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@luisrudge luisrudge merged commit 056835b into master Mar 2, 2018
@luisrudge luisrudge deleted the fix-rollback-error-handling branch March 2, 2018 19:46
@luisrudge luisrudge added this to the v9.3.2 milestone Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants