From db57b097175b3e24cd34ca44803e16aa20f79ac4 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Tue, 28 Nov 2023 17:22:01 -0600 Subject: [PATCH] Remove extra error handling (not needed with https://git.vdb.to/cerc-io/laconicd/pulls/121) --- src/cmds/cns-cmds/record-cmds/list.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/cmds/cns-cmds/record-cmds/list.ts b/src/cmds/cns-cmds/record-cmds/list.ts index 58ffb36..c887455 100644 --- a/src/cmds/cns-cmds/record-cmds/list.ts +++ b/src/cmds/cns-cmds/record-cmds/list.ts @@ -44,18 +44,9 @@ export const handler = async (argv: Arguments) => { const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - let result: any[]; - try { - result = await registry.queryRecords({...filters, type, name}, all as boolean); - } catch (e) { - // https://git.vdb.to/cerc-io/laconicd/issues/118 - if (Array.isArray(e) && (e as []).length && e[0].message?.includes("store doesn't have key")) { - result = []; - } else { - throw e; - } - } + let result = await registry.queryRecords({...filters, type, name}, all as boolean); + // Apply ex post filters. if (bondId) { result = result.filter(v => v.bondId === bondId); }