diff --git a/packages/sdk/src/cosmwasmclient.spec.ts b/packages/sdk/src/cosmwasmclient.spec.ts index 01dce878..287a0252 100644 --- a/packages/sdk/src/cosmwasmclient.spec.ts +++ b/packages/sdk/src/cosmwasmclient.spec.ts @@ -419,7 +419,7 @@ describe("CosmWasmClient", () => { const client = CosmWasmClient.makeReadOnly(httpUrl); await client.queryContractRaw(nonExistentAddress, configKey).then( () => fail("must not succeed"), - error => expect(error).toMatch(`No contract with address ${nonExistentAddress}`), + error => expect(error).toMatch(`No contract found at address "${nonExistentAddress}"`), ); }); }); diff --git a/packages/sdk/src/restclient.spec.ts b/packages/sdk/src/restclient.spec.ts index 276de57b..74f53a22 100644 --- a/packages/sdk/src/restclient.spec.ts +++ b/packages/sdk/src/restclient.spec.ts @@ -430,10 +430,11 @@ describe("RestClient", () => { expect((myInfo.init_msg as any).beneficiary).toEqual(beneficiaryAddress); // make sure random addresses don't give useful info + const nonExistentAddress = makeRandomAddress(); await client - .getContractInfo(beneficiaryAddress) + .getContractInfo(nonExistentAddress) .then(() => fail("this shouldn't succeed")) - .catch(error => expect(error).toMatch(`No contract with address ${beneficiaryAddress}`)); + .catch(error => expect(error).toMatch(`No contract found at address "${nonExistentAddress}"`)); }); describe("contract state", () => { diff --git a/packages/sdk/src/restclient.ts b/packages/sdk/src/restclient.ts index a8d4b1a5..3fd3c847 100644 --- a/packages/sdk/src/restclient.ts +++ b/packages/sdk/src/restclient.ts @@ -311,7 +311,7 @@ export class RestClient { // rest server returns null if no data for the address const info: ContractInfo | null = parseWasmResponse(responseData as WasmResponse); if (!info) { - throw new Error(`No contract with address ${address}`); + throw new Error(`No contract found at address "${address}"`); } return info; }