-
Notifications
You must be signed in to change notification settings - Fork 171
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
Error message for invalid auth provider #528
Error message for invalid auth provider #528
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments below
core/src/Authorization.html
Outdated
`Could not instantate ${idpProviderName} provider : ${err}` | ||
); | ||
const errorMsg = `Error: ${err.message || err}`; | ||
console.error(errorMsg, err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be just console.error(errorMsg);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is inside an if block:
if (GenericHelpers.isPromise(idpProviderInstance)) {
Looks like we will not display the error if the idpProviderInstance
is not a promise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the implementation to output the second err (object) only in case there is a message found.
If the Provider does not return a Promise, it is up to the provider itself to throw any required error.
…rovider-error # Conflicts: # core/src/core-api/config.js
…case there is a message found.
* simplified auth check, added error message
Fixes #510