Explorar o código

More informative error when correlation ID doesn't match

Evan Huus %!s(int64=11) %!d(string=hai) anos
pai
achega
927de31f4d
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      broker.go

+ 3 - 1
broker.go

@@ -378,7 +378,9 @@ func (b *Broker) responseReceiver() {
 		if decodedHeader.correlationID != response.correlationID {
 		if decodedHeader.correlationID != response.correlationID {
 			// TODO if decoded ID < cur ID, discard until we catch up
 			// 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
 			// 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
 			continue
 		}
 		}