Skip to content

Commit fc4bafb

Browse files
author
Manoranjith
committed
✨ [client] Return PeerRejectedError on rejected update
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
1 parent 0d3cb8f commit fc4bafb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func (c *Channel) update(ctx context.Context, next *channel.State) (err error) {
200200
c.Log().Tracef("Received update response (%T): %v", res, res)
201201

202202
if rej, ok := res.(*msgChannelUpdateRej); ok {
203-
return errors.Errorf("update rejected: %s", rej.Reason)
203+
return newPeerRejectedError("channel update", rej.Reason)
204204
}
205205

206206
acc := res.(*msgChannelUpdateAcc) // safe by predicate of the updateResRecv

0 commit comments

Comments
 (0)