diff --git a/yarn-project/key-store/src/test_key_store.ts b/yarn-project/key-store/src/test_key_store.ts index 680f5b988335..cf1b1a957a5c 100644 --- a/yarn-project/key-store/src/test_key_store.ts +++ b/yarn-project/key-store/src/test_key_store.ts @@ -51,7 +51,9 @@ export class TestKeyStore implements KeyStore { private getAccount(pubKey: PublicKey) { const account = this.accounts.find(a => a.getPublicKey().equals(pubKey)); if (!account) { - throw new Error('Unknown account.'); + throw new Error( + 'Unknown account.\nSee docs for context: https://docs.aztec.network/dev_docs/contracts/common_errors#unknown-contract-error', + ); } return account; } diff --git a/yarn-project/pxe/src/pxe_service/pxe_service.ts b/yarn-project/pxe/src/pxe_service/pxe_service.ts index e9afcf62394e..ec375cbad3db 100644 --- a/yarn-project/pxe/src/pxe_service/pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/pxe_service.ts @@ -395,7 +395,9 @@ export class PXEService implements PXE { async #getFunctionCall(functionName: string, args: any[], to: AztecAddress): Promise { const contract = await this.db.getContract(to); if (!contract) { - throw new Error(`Unknown contract ${to}: add it to PXE Service by calling server.addContracts(...)`); + throw new Error( + `Unknown contract ${to}: add it to PXE Service by calling server.addContracts(...).\nSee docs for context: https://docs.aztec.network/dev_docs/contracts/common_errors#unknown-contract-error`, + ); } const functionDao = contract.functions.find(f => f.name === functionName); diff --git a/yarn-project/pxe/src/simulator_oracle/index.ts b/yarn-project/pxe/src/simulator_oracle/index.ts index ed164766e9f1..720df507636e 100644 --- a/yarn-project/pxe/src/simulator_oracle/index.ts +++ b/yarn-project/pxe/src/simulator_oracle/index.ts @@ -33,7 +33,7 @@ export class SimulatorOracle implements DBOracle { const completeAddress = await this.db.getCompleteAddress(address); if (!completeAddress) throw new Error( - `No public key registered for address ${address.toString()}. Register it by calling pxe.registerRecipient(...) or pxe.registerAccount(...)`, + `No public key registered for address ${address.toString()}. Register it by calling pxe.registerRecipient(...) or pxe.registerAccount(...).\nSee docs for context: https://docs.aztec.network/dev_docs/contracts/common_errors#no-public-key-registered-error`, ); return completeAddress; }