From be6875886cb8fe2dfec7903234c2190bbfce609b Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Mon, 26 Aug 2024 14:07:06 +0200 Subject: [PATCH] fix: Log error from google API when retrieving access token see #1562 Signed-off-by: Marcel Klehr --- src/lib/adapters/GoogleDrive.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/adapters/GoogleDrive.ts b/src/lib/adapters/GoogleDrive.ts index 4a3bfe6e96..dab00157f1 100644 --- a/src/lib/adapters/GoogleDrive.ts +++ b/src/lib/adapters/GoogleDrive.ts @@ -124,10 +124,12 @@ export default class GoogleDriveAdapter extends CachingAdapter { }) if (response.status !== 200) { + Logger.log('Failed to retrieve refresh token from Google API: ' + await response.text()) throw new OAuthTokenError() } const json = await response.json() if (!json.access_token || !json.refresh_token) { + Logger.log('Failed to retrieve refresh token from Google API: ' + JSON.stringify(json)) throw new OAuthTokenError() } @@ -155,6 +157,7 @@ export default class GoogleDriveAdapter extends CachingAdapter { ) if (response.status !== 200) { + Logger.log('Failed to retrieve access token from Google API: ' + await response.text()) throw new GoogleDriveAuthenticationError() }