From bcf74089f99f4b8736767c88fe1296ac2a56a763 Mon Sep 17 00:00:00 2001 From: Profitroll Date: Thu, 14 Dec 2023 01:20:42 +0200 Subject: [PATCH] Fix of a fix in exceptions --- extensions/exceptions.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/exceptions.py b/extensions/exceptions.py index bf6660d..0d073da 100644 --- a/extensions/exceptions.py +++ b/extensions/exceptions.py @@ -95,20 +95,20 @@ async def video_search_query_empty_exception_handler( ) -@app.exception_handler(SearchPageInvalidError) -async def search_page_invalid_exception_handler( - request: Request, exc: SearchPageInvalidError +@app.exception_handler(SearchLimitInvalidError) +async def search_limit_invalid_exception_handler( + request: Request, exc: SearchLimitInvalidError ): return UJSONResponse( status_code=HTTP_400_BAD_REQUEST, content={ - "detail": "Parameters 'page' and 'page_size' must be greater or equal to 1." + "detail": "Parameter 'limit' must be greater or equal to 1." }, ) @app.exception_handler(SearchPageInvalidError) -async def search_token_invalid_exception_handler( +async def search_page_invalid_exception_handler( request: Request, exc: SearchPageInvalidError ): return UJSONResponse(