Skip to content

Commit

Permalink
log only server-side errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pudo committed Jul 17, 2024
1 parent e8b899d commit b8f9a63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion yente/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ async def request_middleware(


async def yente_error_handler(req: Request, exc: YenteError) -> Response:
log.exception(f"App error {exc.status}: {exc.detail}")
if exc.status > 499:
log.exception(f"App error {exc.status}: {exc.detail}")
return JSONResponse(status_code=exc.status, content={"detail": exc.detail})


Expand Down

0 comments on commit b8f9a63

Please sign in to comment.