From 30d95657cfece4efc1712637a1bfc23a5ff1eed7 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Thu, 11 Mar 2021 15:11:11 -0700 Subject: [PATCH] Add RingCentral token refresh error logging. --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index a65bd70..a2c3c90 100644 --- a/src/index.ts +++ b/src/index.ts @@ -68,6 +68,10 @@ async function initRingCentralSDK() { clientId: process.env.RC_APP_KEY, clientSecret: process.env.RC_APP_SECRET, }); + const platform = sdk.platform(); + platform.on(platform.events.refreshError, (err) => { + console.error(err); + }); await sdk.login({ username: process.env.RC_LOGIN_USERNAME, extension: process.env.RC_LOGIN_EXT,