fix: add try/catch on db.get
This commit is contained in:
parent
d216f2b43e
commit
1a3241688c
|
@ -194,7 +194,10 @@ export class RegistryService {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getFromDB(pk: Uint8Array): Promise<SignedRegistryEntry | null> {
|
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) {
|
if (val) {
|
||||||
return this.deserializeRegistryEntry(val);
|
return this.deserializeRegistryEntry(val);
|
||||||
|
|
Loading…
Reference in New Issue