From 64ddfa96d69820ce8bf2829f63486f14538cbf46 Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Thu, 20 Jun 2024 20:20:30 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20franciser=20erreur=20de=20membre=20non?= =?UTF-8?q?=20trouv=C3=A9=C2=B7e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db.go b/db.go index 915ddab..f0b2f4e 100644 --- a/db.go +++ b/db.go @@ -5,6 +5,7 @@ import ( _ "embed" "fmt" + "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" ) @@ -297,6 +298,9 @@ LIMIT &membre.ProgrammeID, &membre.ProgrammeName, ); err != nil { + if err == pgx.ErrNoRows { + err = fmt.Errorf("Numéro étudiant valide mais aucun·e membre trouvé·e") + } return }