From bca58a6da6f62fd659f00918a8cf91f8125213d9 Mon Sep 17 00:00:00 2001 From: Jaz Volpert <ericvolp12@gmail.com> Date: Mon, 18 Sep 2023 19:05:17 +0000 Subject: [PATCH] Translate errors for GORM --- util/cliutil/util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/util/cliutil/util.go b/util/cliutil/util.go index a80c3dd0a..886c554cd 100644 --- a/util/cliutil/util.go +++ b/util/cliutil/util.go @@ -196,6 +196,7 @@ func SetupDatabase(dburl string, maxConnections int) (*gorm.DB, error) { db, err := gorm.Open(dial, &gorm.Config{ SkipDefaultTransaction: true, + TranslateError: true, }) if err != nil { return nil, err