From fa7b6e70f024375d32cb54c1319add1e91521e11 Mon Sep 17 00:00:00 2001 From: Ritesh Ghosh Date: Sun, 13 Aug 2023 19:43:34 +0530 Subject: fix(animeSearch): fixed bug where if q is null throws `BadGateway` --- src/controllers/animeSearch.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/controllers') diff --git a/src/controllers/animeSearch.controller.ts b/src/controllers/animeSearch.controller.ts index f03c40b..e95dc3b 100644 --- a/src/controllers/animeSearch.controller.ts +++ b/src/controllers/animeSearch.controller.ts @@ -19,7 +19,7 @@ const getAnimeSearch: RequestHandler< : 1; if (query === null) { - throw createHttpError.BadGateway("Search keyword required"); + throw createHttpError.BadRequest("Search keyword required"); } const data = await scrapeAnimeSearch(query, page); -- cgit v1.2.3