If callers want errors to create events, they can do so by wrapping the error. Sometimes we don't want db errors to be events, and before this there was no way to supress them.
This commit is contained in:
1 parent
ae28bf7838
commit
a216c701ee
1 file changed
+1
-1
@@ -543,5 +543,5 @@ func wrapError(ctx context.Context, err error, op string, errOpts ...errors.Opti
|
||||
errOpts = append(errOpts, errors.WithCode(errors.InvalidFieldMask))
|
||||
}
|
||||
|
||||
return errors.Wrap(ctx, err, errors.Op(op), errOpts...)
|
||||
return errors.Wrap(ctx, err, errors.Op(op), append(errOpts, errors.WithoutEvent())...)
|
||||
}
|
||||
Reference in new issue
Block a user