Skip to content

Commit 18860fe

Browse files
committed
better logging
1 parent 75d1e90 commit 18860fe

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

‎src/PopupWindow.js‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,15 @@ export class PopupWindow {
5656
}
5757

5858
_success(data) {
59-
this._cleanup();
60-
6159
Log.debug("PopupWindow.callback: Successful response from popup window");
60+
61+
this._cleanup();
6262
this._resolve(data);
6363
}
6464
_error(message) {
65+
Log.error("PopupWindow.error: ", message);
66+
6567
this._cleanup();
66-
67-
Log.debug("PopupWindow.error: ", message);
68-
Log.error(message);
6968
this._reject(new Error(message));
7069
}
7170

@@ -89,7 +88,7 @@ export class PopupWindow {
8988

9089
_checkForPopupClosed() {
9190
if (!this._popup || this._popup.closed) {
92-
this._error("PopupWindow.checkForPopupClosed: Popup window closed");
91+
this._error("Popup window closed");
9392
}
9493
}
9594

@@ -128,5 +127,8 @@ export class PopupWindow {
128127
}
129128
}
130129
}
130+
else {
131+
Log.warn("PopupWindow.notifyOpener: no window.opener. Can't complete notification.");
132+
}
131133
}
132134
}

‎src/UserManager.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ export class UserManager extends OidcClient {
138138
}
139139

140140
return user;
141+
}).catch(err=>{
142+
Log.error("UserManager.signinPopupCallback error: " + err && err.message);
143+
141144
});
142145
}
143146

0 commit comments

Comments
 (0)