From 8de258cb8fbe377704f7a9bdc7e9328bc05708df Mon Sep 17 00:00:00 2001 From: sblausten Date: Wed, 21 Dec 2022 10:56:10 +0100 Subject: [PATCH] Always return 200 Signed-off-by: sblausten --- plugins/tech-insights-backend/src/service/router.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/tech-insights-backend/src/service/router.ts b/plugins/tech-insights-backend/src/service/router.ts index 1317687e68..c711c64628 100644 --- a/plugins/tech-insights-backend/src/service/router.ts +++ b/plugins/tech-insights-backend/src/service/router.ts @@ -124,10 +124,6 @@ export async function createRouter< } }); const results = await Promise.all(tasks); - const noResults = results.flatMap(r => r.results).length === 0; - if (errors.length > 0 && noResults) { - return res.status(500).send({ errors, results }); - } if (errors.length > 0) { return res.json({ errors, results }); }