From 01d6116968ad4059a48c27f1152657bebfae481d Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 15 Oct 2024 21:17:38 +0530 Subject: [PATCH] Update packages/nocodb/src/version-upgrader/upgraders/0225002_ncDatasourceDecrypt.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../version-upgrader/upgraders/0225002_ncDatasourceDecrypt.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/version-upgrader/upgraders/0225002_ncDatasourceDecrypt.ts b/packages/nocodb/src/version-upgrader/upgraders/0225002_ncDatasourceDecrypt.ts index 0d69bfcfe1..71cd1ed228 100644 --- a/packages/nocodb/src/version-upgrader/upgraders/0225002_ncDatasourceDecrypt.ts +++ b/packages/nocodb/src/version-upgrader/upgraders/0225002_ncDatasourceDecrypt.ts @@ -34,8 +34,8 @@ const decryptConfigWithFallbackKey = async ({ // validate by parsing JSON try { parsedVal = JSON.parse(decryptedVal); - } catch { - throw new Error('JSON parse failed'); + } catch (parseError) { + throw new Error(`JSON parse failed: ${parseError.message}`); } // if parsed value is null, return null return parsedVal === null ? null : decryptedVal;