diff --git a/lib/backends/kv-backend.js b/lib/backends/kv-backend.js index 92394ed8..047405e3 100644 --- a/lib/backends/kv-backend.js +++ b/lib/backends/kv-backend.js @@ -32,12 +32,14 @@ class KVBackend extends AbstractBackend { try { parsedValue = JSON.parse(value) } catch (err) { - this._logger.warn(`Failed to JSON.parse '${value}':`, err) + this._logger.warn(`Failed to JSON.parse value for '${secretProperty.key}',` + + ` please verify that your secret value is correctly formatted as JSON.` + + ` To use plain text secret remove the 'property: ${secretProperty.property}'`) return } if (!(secretProperty.property in parsedValue)) { - throw new Error(`Could not find property ${secretProperty.property} in secretProperty.key`) + throw new Error(`Could not find property ${secretProperty.property} in ${secretProperty.key}`) } return parsedValue[secretProperty.property]