Skip to content

Commit

Permalink
Merge pull request #1373 from dwrensha/service-config-error
Browse files Browse the repository at this point in the history
Display an error message on catching ServiceConfiguation.ConfigError.
  • Loading branch information
kentonv committed Jan 16, 2016
2 parents 6e668c9 + 1532b01 commit c4cf509
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shell/packages/sandstorm-accounts-ui/login_buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ var loginResultCallback = function (serviceName, err) {
} else if (err instanceof Accounts.LoginCancelledError) {
// do nothing
} else if (err instanceof ServiceConfiguration.ConfigError) {
Router.go("adminSettings");
loginButtonsSession.errorMessage(
"Configuration problem: " + err.message + ". Please visit the Admin Settings page within " +
"Sandstorm, or ask your administrator to do so. You may need an admin token. Read more by " +
"clicking Troubleshooting below.");
} else {
loginButtonsSession.errorMessage(err.reason || "Unknown error");
}
Expand Down Expand Up @@ -206,6 +209,7 @@ Template.oauthLoginButton.events({

var loginWithService = Meteor[instance.data.data.method];

var serviceName = instance.data.data.displayName;
loginWithService({}, function (err) {
loginResultCallback(serviceName, err);
});
Expand Down

0 comments on commit c4cf509

Please sign in to comment.