From 1a3241688c2b92a8c685a6da15ead30c117582ff Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 1 Sep 2023 20:27:34 -0400 Subject: [PATCH] fix: add try/catch on db.get --- src/service/registry.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/service/registry.ts b/src/service/registry.ts index b1844cd..5774bad 100644 --- a/src/service/registry.ts +++ b/src/service/registry.ts @@ -194,7 +194,10 @@ export class RegistryService { } async getFromDB(pk: Uint8Array): Promise { - const val = await this.db?.get(stringifyBytes(pk)); + let val; + try { + val = await this.db?.get(stringifyBytes(pk)); + } catch {} if (val) { return this.deserializeRegistryEntry(val);