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:
co-authored by
Sofia Papagiannaki
parent
8c8f584b41
commit
10ee900beb
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user