From 9972eb249884cb05727984d87beae832400a9b66 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Sat, 14 Nov 2015 15:44:26 -0800 Subject: [PATCH] Adds a check for in-band error returns in the coordinate RaftApply. --- consul/coordinate_endpoint.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/consul/coordinate_endpoint.go b/consul/coordinate_endpoint.go index e5774764e6..5fc9c5f36e 100644 --- a/consul/coordinate_endpoint.go +++ b/consul/coordinate_endpoint.go @@ -92,9 +92,13 @@ func (c *Coordinate) batchApplyUpdates() error { t := structs.CoordinateBatchUpdateType | structs.IgnoreUnknownTypeFlag slice := updates[start:end] - if _, err := c.srv.raftApply(t, slice); err != nil { + resp, err := c.srv.raftApply(t, slice) + if err != nil { return err } + if respErr, ok := resp.(error); ok { + return respErr + } } return nil }