Skip to content

Can't catch Unhandled Rejection (Error): resolver or addr is not configured for ENS name (argument="name", value="", code=INVALID_ARGUMENT, version=contracts/5.0.8) #1234

Closed
@0xmikko

Description

Hi! I run this code in browser, and can't catch promise rejection.
Important: I added await before getContract,however in typings you return Contract, not Promise but the code throw promise rejection!

Code:
let vault;
try {
vault = (await ethers.ContractFactory.getContract(
CONTRACT_ADDRESS,
vaultJson.abi,
signer
) as unknown) as Vault;
} catch (e) {
console.log("Error getting contract");
return;
}

Expected behavior:
Rejection in getContract would be caught in try-catch block

Real outcome:
Unhandled Rejection (Error): resolver or addr is not configured for ENS name (argument="name", value="", code=INVALID_ARGUMENT, version=contracts/5.0.8)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugVerified to be an issue.fixed/completeThis Bug is fixed or Enhancement is complete and published.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions