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)