fix: add try/catch on db.get

This commit is contained in:
Derrick Hammer 2023-09-01 20:27:34 -04:00
parent d216f2b43e
commit 1a3241688c
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 1 deletions

View File

@ -194,7 +194,10 @@ export class RegistryService {
}
async getFromDB(pk: Uint8Array): Promise<SignedRegistryEntry | null> {
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);