Commit 7c4333a6 authored by jamiewalch's avatar jamiewalch Committed by Commit bot

Improve sign-in error UX.

If the user cancels their sign-in, or if some other error occurs, we
currently display "An unknown error occurred", which is not very helpful.

Review URL: https://codereview.chromium.org/585913003

Cr-Commit-Position: refs/heads/master@{#295800}
parent d0a6a8a1
......@@ -124,13 +124,12 @@ remoting.Identity.prototype.onAuthComplete_ = function(interactive, token) {
// If not, pass an error back to the callback(s) if we've already prompted the
// user for permission.
// TODO(jamiewalch): Figure out what to do with the error in this case.
if (interactive) {
console.error(chrome.runtime.lastError);
while (this.pendingCallbacks_.length > 0) {
var callback = /** @type {remoting.Identity.Callbacks} */
this.pendingCallbacks_.shift();
callback.onError(remoting.Error.UNEXPECTED);
callback.onError(remoting.Error.NOT_AUTHENTICATED);
}
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment