소스 검색

Merge pull request #136 from Shopify/better-debug

More informative error when correlation ID doesn't match
Evan Huus 11 년 전
부모
커밋
57544182fb
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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
 		}
 		}