Merge pull request 'Fix of a fix in exceptions' (#40) from master into dev
Reviewed-on: #40
This commit is contained in:
commit
58933a9279
@ -95,20 +95,20 @@ async def video_search_query_empty_exception_handler(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@app.exception_handler(SearchPageInvalidError)
|
@app.exception_handler(SearchLimitInvalidError)
|
||||||
async def search_page_invalid_exception_handler(
|
async def search_limit_invalid_exception_handler(
|
||||||
request: Request, exc: SearchPageInvalidError
|
request: Request, exc: SearchLimitInvalidError
|
||||||
):
|
):
|
||||||
return UJSONResponse(
|
return UJSONResponse(
|
||||||
status_code=HTTP_400_BAD_REQUEST,
|
status_code=HTTP_400_BAD_REQUEST,
|
||||||
content={
|
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)
|
@app.exception_handler(SearchPageInvalidError)
|
||||||
async def search_token_invalid_exception_handler(
|
async def search_page_invalid_exception_handler(
|
||||||
request: Request, exc: SearchPageInvalidError
|
request: Request, exc: SearchPageInvalidError
|
||||||
):
|
):
|
||||||
return UJSONResponse(
|
return UJSONResponse(
|
||||||
|
Loading…
Reference in New Issue
Block a user