From b6e111b21c23ba2f6335861f956197537977fd34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 16 Dec 2025 13:10:02 +0100 Subject: [PATCH] fix: dont log routes.json 404 (#3665) --- lnbits/exceptions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lnbits/exceptions.py b/lnbits/exceptions.py index effe034f..0b17c4f7 100644 --- a/lnbits/exceptions.py +++ b/lnbits/exceptions.py @@ -138,7 +138,9 @@ def register_exception_handlers(app: FastAPI): # noqa: C901 @app.exception_handler(404) async def error_handler_404(request: Request, exc: HTTPException): - logger.error(f"404: {request.url.path} {exc.status_code}: {exc.detail}") + + if not request.url.path.endswith("routes.json"): + logger.error(f"404: {request.url.path} {exc.status_code}: {exc.detail}") if not _is_browser_request(request): return JSONResponse(