diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/kvstore/kvstore_utils.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/kvstore/kvstore_utils.py index 89169305fc..c41b92ae98 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/kvstore/kvstore_utils.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/kvstore/kvstore_utils.py @@ -157,7 +157,7 @@ def get(chain_id: ChainId, address: str, key: str) -> str: or "kvstores" not in kvstore_data["data"] or len(kvstore_data["data"]["kvstores"]) == 0 ): - raise KVStoreClientError(f"Key '{key}' not found for address {address}") + return "" return kvstore_data["data"]["kvstores"][0]["value"] diff --git a/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts b/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts index fcec9c6ad7..f48340babf 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts @@ -406,12 +406,10 @@ export class KVStoreUtils { ); if (!kvstores || kvstores.length === 0) { - throw new Error(`Key "${key}" not found for address ${address}`); + return ''; } - const value = kvstores[0].value; - - return value; + return kvstores[0].value; } /**