From f0ff0f6d6034b4a5f26a96339a54495e0182e530 Mon Sep 17 00:00:00 2001 From: otherview Date: Wed, 20 Sep 2023 18:44:23 +0100 Subject: [PATCH] plucking that err --- go/enclave/storage/init/migration/db_migration.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/go/enclave/storage/init/migration/db_migration.go b/go/enclave/storage/init/migration/db_migration.go index 15815ebfa5..d6016815bc 100644 --- a/go/enclave/storage/init/migration/db_migration.go +++ b/go/enclave/storage/init/migration/db_migration.go @@ -3,6 +3,7 @@ package migration import ( "database/sql" "embed" + "encoding/base64" "errors" "fmt" "io/fs" @@ -48,8 +49,8 @@ func DBMigration(db *sql.DB, sqlFiles embed.FS, logger gethlog.Logger) error { } err = executeMigration(db, string(content), i) if err != nil { - fmt.Println(err) - logger.Error(fmt.Sprintf("%s", err.Error())) + fmt.Println(base64.StdEncoding.EncodeToString([]byte(err.Error()))) + logger.Error(fmt.Sprintf("%s", base64.StdEncoding.EncodeToString([]byte(err.Error())))) return fmt.Errorf("unable to execute migration for %s - %w", migrationFiles[i].Name(), err) } logger.Info("Successfully executed", "file", migrationFiles[i].Name(), "index", i)