Browse Source

Merge pull request #136 from Shopify/better-debug

More informative error when correlation ID doesn't match
Evan Huus 11 years ago
parent
commit
57544182fb
1 changed files with 3 additions and 1 deletions
  1. 3 1
      broker.go

+ 3 - 1
broker.go

@@ -378,7 +378,9 @@ func (b *Broker) responseReceiver() {
 		if decodedHeader.correlationID != response.correlationID {
 			// TODO if decoded ID < cur ID, discard until we catch up
 			// TODO if decoded ID > cur ID, save it so when cur ID catches up we have a response
-			response.errors <- DecodingError{Info: "CorrelationID didn't match"}
+			response.errors <- DecodingError{
+				Info: fmt.Sprintf("CorrelationID didn't match, wanted %d, got %d", response.correlationID, decodedHeader.correlationID),
+			}
 			continue
 		}