Fix handling of broken items on startup
This commit is contained in:
parent
d0cac2263e
commit
6f14b5f45d
1 changed files with 8 additions and 4 deletions
|
@ -426,11 +426,15 @@ async function getAllItems(): Promise<AllItemsType> {
|
|||
|
||||
const keys = ITEM_SPECS[key];
|
||||
|
||||
const deserializedValue = keys
|
||||
? (specToBytes(keys, { value }) as ItemType<typeof key>).value
|
||||
: value;
|
||||
try {
|
||||
const deserializedValue = keys
|
||||
? (specToBytes(keys, { value }) as ItemType<typeof key>).value
|
||||
: value;
|
||||
|
||||
result[key] = deserializedValue;
|
||||
result[key] = deserializedValue;
|
||||
} catch (error) {
|
||||
log.warn(`getAllItems(${id}): Failed to parse item from spec`, error);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue