From 5577f90f9599b3e56f97175e122c102846b203f7 Mon Sep 17 00:00:00 2001 From: jdl Date: Tue, 19 Nov 2024 08:57:49 +0100 Subject: [PATCH] wip --- sqlgen/sqlite.go.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlgen/sqlite.go.tmpl b/sqlgen/sqlite.go.tmpl index 105c944..dd8b9c2 100644 --- a/sqlgen/sqlite.go.tmpl +++ b/sqlgen/sqlite.go.tmpl @@ -18,10 +18,10 @@ func translateError(err error) error { return nil } if e, ok := err.(sqlite3.Error); ok && e.Code == 19 { - return ErrConstraint + return errors.Join(ErrConstraint, err) } if errors.Is(err, sql.ErrNoRows) { - return ErrNotFound + return errors.Join(ErrNotFound, err) } return err }