You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2022/09/09 07:22:06 UTC
[incubator-devlake] branch release-v0.13 updated: fix: the new error interface is not part of v0.13
This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch release-v0.13
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v0.13 by this push:
new e3684fe2 fix: the new error interface is not part of v0.13
e3684fe2 is described below
commit e3684fe2348dd43577648b38f247abdf325ec65d
Author: abeizn <zi...@merico.dev>
AuthorDate: Fri Sep 9 15:21:56 2022 +0800
fix: the new error interface is not part of v0.13
---
plugins/jira/models/migrationscripts/20220716_add_init_tables.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugins/jira/models/migrationscripts/20220716_add_init_tables.go b/plugins/jira/models/migrationscripts/20220716_add_init_tables.go
index 65affff8..7a10d8a2 100644
--- a/plugins/jira/models/migrationscripts/20220716_add_init_tables.go
+++ b/plugins/jira/models/migrationscripts/20220716_add_init_tables.go
@@ -20,11 +20,11 @@ package migrationscripts
import (
"context"
"encoding/base64"
+ "fmt"
"strings"
"time"
"github.com/apache/incubator-devlake/config"
- "github.com/apache/incubator-devlake/errors"
"github.com/apache/incubator-devlake/plugins/core"
"github.com/apache/incubator-devlake/plugins/jira/models/migrationscripts/archived"
"gorm.io/gorm"
@@ -141,7 +141,7 @@ func (*addInitTables) Up(ctx context.Context, db *gorm.DB) (err error) {
c := config.GetConfig()
encKey := c.GetString(core.EncodeKeyEnvStr)
if encKey == "" {
- return errors.BadInput.New("jira v0.11 invalid encKey", errors.AsUserMessage())
+ return fmt.Errorf("jira v0.11 invalid encKey")
}
auth, err := core.Decrypt(encKey, v.BasicAuthEncoded)
if err != nil {
@@ -161,7 +161,7 @@ func (*addInitTables) Up(ctx context.Context, db *gorm.DB) (err error) {
// create
tx := db.Create(&conn)
if tx.Error != nil {
- return errors.Default.Wrap(tx.Error, "error adding connection to DB")
+ return tx.Error
}
}
}