Errors: Remove direct dependencies on github.com/pkg/errors (#64026)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
This commit is contained in:
Emil Tullstedt
2023-03-02 16:28:10 +01:00
committed by GitHub
co-authored by Sofia Papagiannaki
parent 8c8f584b41
commit 10ee900beb
10 changed files with 23 additions and 22 deletions
+1 -2
View File
@@ -5,7 +5,6 @@ import (
"fmt"
"time"
"github.com/pkg/errors"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/infra/db"
@@ -132,7 +131,7 @@ func (ss *sqlStore) AddAPIKey(ctx context.Context, cmd *apikey.AddCommand) error
}
if _, err := sess.Insert(&t); err != nil {
return errors.Wrap(err, "failed to insert token")
return fmt.Errorf("%s: %w", "failed to insert token", err)
}
cmd.Result = &t
return nil