From 5f32583895f1c7286bef4c765022279350a31c5f Mon Sep 17 00:00:00 2001 From: Meni Yakove Date: Wed, 7 May 2025 14:10:55 +0300 Subject: [PATCH] Do not log exception when it is NoPullRequestError --- webhook_server/app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webhook_server/app.py b/webhook_server/app.py index dd95ded4..afcbb08d 100644 --- a/webhook_server/app.py +++ b/webhook_server/app.py @@ -154,6 +154,10 @@ async def process_webhook(request: Request, background_tasks: BackgroundTasks) - async def process_with_error_handling() -> None: try: await api.process() + + except NoPullRequestError: + return + except Exception as e: logger.exception(f"{log_context} Error in background task: {e}")