Add RingCentral token refresh error logging.

This commit is contained in:
Matt Low 2021-03-11 15:11:11 -07:00
parent 1c1682fe4f
commit 30d95657cf

View File

@ -68,6 +68,10 @@ async function initRingCentralSDK() {
clientId: process.env.RC_APP_KEY, clientId: process.env.RC_APP_KEY,
clientSecret: process.env.RC_APP_SECRET, clientSecret: process.env.RC_APP_SECRET,
}); });
const platform = sdk.platform();
platform.on(platform.events.refreshError, (err) => {
console.error(err);
});
await sdk.login({ await sdk.login({
username: process.env.RC_LOGIN_USERNAME, username: process.env.RC_LOGIN_USERNAME,
extension: process.env.RC_LOGIN_EXT, extension: process.env.RC_LOGIN_EXT,