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 5c914b8193c3..439b06c6cfde 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 @@ -57,12 +57,7 @@ export class KVArchiverDataStore implements ArchiverDataStore { * @returns The requested L2 blocks, without any logs attached */ getBlocks(start: number, limit: number): Promise { - try { - return Promise.resolve(Array.from(this.#blockStore.getBlocks(start, limit))); - } catch (err) { - // this function is sync so if any errors are thrown we need to make sure they're passed on as rejected Promises - return Promise.reject(err); - } + return Promise.resolve(Array.from(this.#blockStore.getBlocks(start, limit))); } /** @@ -135,7 +130,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); + } } /**