aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRitesh Ghosh <[email protected]>2023-08-13 19:43:34 +0530
committerRitesh Ghosh <[email protected]>2023-08-13 19:43:34 +0530
commitfa7b6e70f024375d32cb54c1319add1e91521e11 (patch)
tree5d1c83948e9ad91d11069ca91a2fa86058eb467c /src
parent953c99a9f3b3a8fa24a99f4e907b38ca465e4949 (diff)
downloadaniwatch-api-fa7b6e70f024375d32cb54c1319add1e91521e11.tar.xz
aniwatch-api-fa7b6e70f024375d32cb54c1319add1e91521e11.zip
fix(animeSearch): fixed bug where if q is null throws `BadGateway`
Diffstat (limited to 'src')
-rw-r--r--src/controllers/animeSearch.controller.ts2
1 files changed, 1 insertions, 1 deletions
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);