diff --git a/main.py b/main.py index f3b6552..05768b2 100644 --- a/main.py +++ b/main.py @@ -19,7 +19,7 @@ async def check_token(request: fastapi.Request, call_next): if QUEUES_TOKEN: token = request.headers.get('X-Queues-Token') if not token or token != QUEUES_TOKEN: - raise fastapi.HTTPException(403) + return fastapi.JSONResponse(status_code=403, content={'message': 'token is not provided or incorrect'}) return await call_next(request)