Remove unnecessary joinError unwrap

Signed-off-by: Jin Dong <jin.dong@databricks.com>
This commit is contained in:
Jin Dong
2023-08-21 19:03:41 -07:00
parent cd8c8ae4bc
commit 6d8329d7f5
2 changed files with 1 additions and 19 deletions

View File

@@ -140,11 +140,6 @@ func (ms *MetaStore) WithTransaction(ctx context.Context, writable bool, fn Tran
if err := errors.Join(result...); err != nil {
log.G(ctx).WithError(err).Debug("snapshotter error")
// Unwrap if just one error
if errs, ok := err.(interface{ Unwrap() []error }); ok && len(errs.Unwrap()) == 1 {
return errs.Unwrap()[0]
}
return err
}