diff options
| author | Ritesh Ghosh <[email protected]> | 2023-08-13 19:43:34 +0530 |
|---|---|---|
| committer | Ritesh Ghosh <[email protected]> | 2023-08-13 19:43:34 +0530 |
| commit | fa7b6e70f024375d32cb54c1319add1e91521e11 (patch) | |
| tree | 5d1c83948e9ad91d11069ca91a2fa86058eb467c /src | |
| parent | 953c99a9f3b3a8fa24a99f4e907b38ca465e4949 (diff) | |
| download | aniwatch-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.ts | 2 |
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); |
