From ed28a24c8aedbb1874089c8d445872393b877842 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Sun, 22 Dec 2024 22:33:54 +0800 Subject: [PATCH] fix duplicated response header --- backend/src/api/bitcoin/bitcoin.routes.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/api/bitcoin/bitcoin.routes.ts b/backend/src/api/bitcoin/bitcoin.routes.ts index 339c4cff9..ccdc3dc7c 100644 --- a/backend/src/api/bitcoin/bitcoin.routes.ts +++ b/backend/src/api/bitcoin/bitcoin.routes.ts @@ -229,6 +229,7 @@ class BitcoinRoutes { if (e instanceof Error && e instanceof Error && e.message && e.message.indexOf('No such mempool or blockchain transaction') > -1) { statusCode = 404; handleError(req, res, statusCode, 'No such mempool or blockchain transaction'); + return; } handleError(req, res, statusCode, 'Failed to get transaction'); } @@ -248,6 +249,7 @@ class BitcoinRoutes { if (e instanceof Error && e.message && e.message.indexOf('No such mempool or blockchain transaction') > -1) { statusCode = 404; handleError(req, res, statusCode, 'No such mempool or blockchain transaction'); + return; } handleError(req, res, statusCode, 'Failed to get raw transaction'); } @@ -334,6 +336,7 @@ class BitcoinRoutes { if (e instanceof Error && e.message && e.message.indexOf('No such mempool or blockchain transaction') > -1) { statusCode = 404; handleError(req, res, statusCode, 'No such mempool or blockchain transaction'); + return; } handleError(req, res, statusCode, 'Failed to get transaction status'); }