Browse Source

Update packages/nocodb/src/version-upgrader/upgraders/0225002_ncDatasourceDecrypt.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
pull/9661/head
Pranav C 1 month ago committed by GitHub
parent
commit
01d6116968
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/nocodb/src/version-upgrader/upgraders/0225002_ncDatasourceDecrypt.ts

4
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;

Loading…
Cancel
Save