fix (events): convert multierror to stdlib error (#3743)
* fix (events): convert multierror to stdlib error multierror errors will be converted to a stdlib error (because multierror doesn't support json marshaling). * refact (errors): convert from multierror to stdlib errors.Join(...) * refact: convert from pkg/errors to stdlib error wrapping
This commit is contained in:
28 files changed
+142
-152
No files matched your search
@@ -40,7 +40,6 @@ import (
|
||||
"github.com/hashicorp/boundary/internal/db/schema/migration"
|
||||
"github.com/hashicorp/boundary/internal/db/schema/migrations"
|
||||
"github.com/hashicorp/boundary/internal/errors"
|
||||
"github.com/hashicorp/go-multierror"
|
||||
"github.com/jackc/pgx/v5/pgconn"
|
||||
)
|
||||
|
||||
@@ -197,7 +196,7 @@ func (p *Postgres) CommitRun(ctx context.Context) error {
|
||||
}
|
||||
if err := p.tx.Commit(); err != nil {
|
||||
if errRollback := p.tx.Rollback(); errRollback != nil && errRollback != sql.ErrTxDone {
|
||||
err = multierror.Append(err, errRollback)
|
||||
err = stderrors.Join(err, errRollback)
|
||||
}
|
||||
return errors.Wrap(ctx, err, op)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user