Silence events from DB errors (#2601) (#2602)

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.
pull/2609/head
Johan Brandhorst-Satzkorn 4 years ago committed by GitHub
parent ae28bf7838
commit a216c701ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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())...)
}

Loading…
Cancel
Save