From 613e5f18e97f302238b45bce74b6c529c5495a33 Mon Sep 17 00:00:00 2001 From: Laura Warr Date: Fri, 18 Aug 2023 12:47:03 -0400 Subject: [PATCH] fix: Return empty string when token refresh fails --- src/auth/ApiAuth.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/auth/ApiAuth.ts b/src/auth/ApiAuth.ts index 3289887b0..03d64be30 100644 --- a/src/auth/ApiAuth.ts +++ b/src/auth/ApiAuth.ts @@ -141,11 +141,12 @@ export class ApiAuth { storeAccessToken({ accessToken, refreshToken }, this.authPath) return accessToken } catch (e) { - let msg = 'Failed to refresh DevCycle API token. Please login using "dvc login again"' + let msg = 'Failed to refresh DevCycle API token.' if (e instanceof Error) { msg += ` ${e.message}` } - throw new Error(msg) + console.log(msg) + return '' } } }