Inclusion of create target error description (#966)
* Inclusion of the error description Is your feature request related to a problem? Please describe. During a failure in creating the target, the exception caused did not come with a description capable of bringing a quick understanding of the problem, just the stacktrace. Describe the solution you'd like Use the existing module to include messages.
This commit is contained in:
1 parent
4738ceee5d
commit
34ee5d3371
1 file changed
+1
-1
@@ -79,7 +79,7 @@ func (r *Repository) CreateTcpTarget(ctx context.Context, target *TcpTarget, opt
|
||||
var targetOplogMsg oplog.Message
|
||||
returnedTarget = t.Clone()
|
||||
if err := w.Create(ctx, returnedTarget, db.NewOplogMsg(&targetOplogMsg)); err != nil {
|
||||
return errors.Wrap(err, op)
|
||||
return errors.Wrap(err, op, errors.WithMsg("unable to create target"))
|
||||
}
|
||||
msgs = append(msgs, &targetOplogMsg)
|
||||
if len(newHostSets) > 0 {
|
||||
|
||||
Reference in new issue
Block a user