From 927027485082bfa8b9a879bed06e2187f4b5a5bf Mon Sep 17 00:00:00 2001 From: mj52951 Date: Thu, 19 Dec 2024 15:13:24 +0100 Subject: [PATCH] Correct error message --- src/api/controllers/RoutesController.ts | 2 +- tests/e2e/indexing.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/controllers/RoutesController.ts b/src/api/controllers/RoutesController.ts index 7e15da8..5546457 100644 --- a/src/api/controllers/RoutesController.ts +++ b/src/api/controllers/RoutesController.ts @@ -23,7 +23,7 @@ export class RoutesController { const routesResult = await this.routesService.findRoutes({}); await reply.status(200).send(routesResult); } catch (error) { - logger.error("Error occurred when fetching transfers", error); + logger.error("Error occurred when fetching routes", error); await reply.status(500).send({ error: "Internal server error" }); } } diff --git a/tests/e2e/indexing.spec.ts b/tests/e2e/indexing.spec.ts index 55631a0..5332089 100644 --- a/tests/e2e/indexing.spec.ts +++ b/tests/e2e/indexing.spec.ts @@ -65,10 +65,10 @@ describe("Indexer e2e tests", function () { const transfers: Array = await response.json(); for (const transfer of transfers) { - if (transfer.route.fromDomain?.name.toLowerCase() == Network.SUBSTRATE) { + if (transfer.route.fromDomain.name.toLowerCase() == Network.SUBSTRATE) { substrateDeposits++; } - switch (transfer.route.resource?.type) { + switch (transfer.route.resource.type) { case ResourceType.FUNGIBLE: { fungibleDeposits++; break;