From 955362f4e2d17feaf901221622d39c79501bccf7 Mon Sep 17 00:00:00 2001 From: Alex Gherghisan Date: Thu, 18 Jan 2024 11:39:51 +0000 Subject: [PATCH] fix: wrap error in Promise --- .../src/archiver/kv_archiver_store/kv_archiver_store.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts b/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts index 5c914b8193c..74be29d9d58 100644 --- a/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts +++ b/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts @@ -135,7 +135,11 @@ export class KVArchiverDataStore implements ArchiverDataStore { * @returns The requested L1 to L2 message or throws if not found. */ getConfirmedL1ToL2Message(messageKey: Fr): Promise { - return Promise.resolve(this.#messageStore.getConfirmedMessage(messageKey)); + try { + return Promise.resolve(this.#messageStore.getConfirmedMessage(messageKey)); + } catch (err) { + return Promise.reject(err); + } } /**