From 357a245536d1517d2ad035566586de67515a3e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Pavl=C3=ADn?= Date: Tue, 17 Oct 2023 16:09:15 +0200 Subject: [PATCH] fix(rest): mount filterClient for REST API --- apps/wakunode2/app.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/wakunode2/app.nim b/apps/wakunode2/app.nim index 97dbec747..c97db2458 100644 --- a/apps/wakunode2/app.nim +++ b/apps/wakunode2/app.nim @@ -596,6 +596,10 @@ proc startRestServer(app: App, address: ValidIpAddress, port: Port, conf: WakuNo ## Filter REST API if conf.filter: + try: + waitFor app.node.mountFilterClient() + except CatchableError: + return err("Failed to mount FilterClient" & getCurrentExceptionMsg()) let legacyFilterCache = rest_legacy_filter_api.MessageCache.init() rest_legacy_filter_api.installLegacyFilterRestApiHandlers(server.router, app.node, legacyFilterCache)