Skip to content

Commit 9d61642

Browse files
fix: reclassify MetaRegistryFailure as unexpected error (#141)
Renames the error thrown when the CDM meta-registry fails to return a live contract address from BadRegistryLookup to MetaRegistryFailure. This removes it from the isExpectedCliError allowlist so it registers as cli.expected=false in Sentry — it is an infra failure, not a user mistake.
1 parent c580e06 commit 9d61642

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/utils/registry.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ describe("getRegistryContract", () => {
6666
const rawClient = {} as any;
6767

6868
await expect(getRegistryContract(rawClient, fakeSigner)).rejects.toThrow(
69-
/BadRegistryLookup/,
69+
/MetaRegistryFailure/,
7070
);
7171

7272
expect(fromClientMock).not.toHaveBeenCalled();

src/utils/registry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export async function getRegistryContract(
3030
} catch (err) {
3131
const msg = err instanceof Error ? err.message : String(err);
3232
throw new Error(
33-
`BadRegistryLookup: Could not resolve the live Playground registry contract address from the CDM meta-registry. Refusing to use the cdm.json snapshot because it may be stale. ${msg}`,
33+
`MetaRegistryFailure: Could not resolve the live Playground registry contract address from the CDM meta-registry. Refusing to use the cdm.json snapshot because it may be stale. ${msg}`,
3434
{ cause: err instanceof Error ? err : undefined },
3535
);
3636
}

0 commit comments

Comments
 (0)