From e72c0dcbd80c8daa795a245fb2e0dc053adf83cf Mon Sep 17 00:00:00 2001 From: bruno Date: Wed, 8 Jul 2026 09:37:51 -0400 Subject: [PATCH] fix: board 404 returns clean page, not 500 - board.py: catch httpx.HTTPStatusError 404 and show 'Projet introuvable' page - all functional tests pass: dashboard (50 unique), board, issues, checklists, notes, CSRF --- app/routers/board.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/routers/board.py b/app/routers/board.py index 6a57d8b..bcde913 100644 --- a/app/routers/board.py +++ b/app/routers/board.py @@ -95,6 +95,14 @@ async def board( column_map[col].append(issue) except Exception as e: + from httpx import HTTPStatusError + if isinstance(e, HTTPStatusError) and e.response is not None and e.response.status_code == 404: + html = '
' + html += '

Projet introuvable

' + html += f'

{owner}/{repo} n\'existe pas sur Gitea.

' + html += 'Retour aux projets' + html += '
' + return HTMLResponse(html, status_code=404) logger.error("Board error: %s", e) return HTMLResponse(f"

Erreur: {e}

", status_code=500)