Skip to content
This repository was archived by the owner on Jul 26, 2022. It is now read-only.

Commit 986ea25

Browse files
author
Florent Delannoy
committed
Stringify JSON response for compatibility with KV backend
Due to changes in #206, we now need to stringify the response from the backend which currently comes as an object rather than a JSON string. Fixes issue such as: ``` {"level":30,"time":1573653228258,"pid":19,"hostname":"external-secrets-8zq4bq","msg":"running poll on the secret example/example","v":1} {"level":40,"time":1573653228468,"pid":19,"hostname":"external-secrets-8zq4bq","msg":"Failed to JSON.parse value for 'secrets/data/example/credentials', please verify that your secret value is correctly formatted as JSON. To use plain text secret remove the 'property: apiToken'","v":1} ```
1 parent 0af60a2 commit 986ea25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/backends/vault-backend.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class VaultBackend extends KVBackend {
5353
this._logger.debug(`reading secret key ${key} from vault`)
5454
const secretResponse = await this._client.read(key)
5555

56-
return secretResponse.data.data
56+
return JSON.stringify(secretResponse.data.data)
5757
}
5858
}
5959

0 commit comments

Comments
 (0)