Remove extra error handling (not needed with cerc-io/laconicd#121)
All checks were successful
Tests / sdk_tests (pull_request) Successful in 3m44s
All checks were successful
Tests / sdk_tests (pull_request) Successful in 3m44s
This commit is contained in:
parent
d3fc1658c9
commit
db57b09717
@ -44,18 +44,9 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
|
|
||||||
let result: any[];
|
let result = await registry.queryRecords({...filters, type, name}, all as boolean);
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Apply ex post filters.
|
||||||
if (bondId) {
|
if (bondId) {
|
||||||
result = result.filter(v => v.bondId === bondId);
|
result = result.filter(v => v.bondId === bondId);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user