# \[Rust\]Parse correlation id test fail

**URL:** https://forum.codecrafters.io/t/rust-parse-correlation-id-test-fail/13276
**Category:** Challenges
**Tags:** challenge:kafka
**Created:** [July 9, 2025, 8:08am UTC](https://forum.codecrafters.io/t/rust-parse-correlation-id-test-fail/13276 "2025-07-09T08:08:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![zgy03916618421](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/zgy03916618421/32/14208_2.png) [@zgy03916618421](https://forum.codecrafters.io/u/zgy03916618421)
#### Post date: [July 9, 2025, 8:08am UTC](https://forum.codecrafters.io/t/rust-parse-correlation-id-test-fail/13276/1 "2025-07-09T08:08:19Z")

</div>

why dose it fail the test, throw error: “error reading from connection: read tcp 127.0.0.1:42154-\>127.0.0.1:9092: read: connection reset by peer  
[tester::#WA6] Test failed”

```auto
for stream in listener.incoming() {
        match stream {
            Ok(mut stream) => {
                let mut request_buf = [0; 12];
                stream.read_exact(&mut request_buf).unwrap();
                let response = &[&[0, 0, 0, 0], &request_buf[8..]].concat();   
                stream.write(response).unwrap();
                stream.flush().unwrap();
            }
            Err(e) => {
                println!("error: {}", e);
            }
        }
    }

```

---

<div class="post-metadata">

### Author: ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)
#### Post date: [July 13, 2025, 5:24am UTC](https://forum.codecrafters.io/t/rust-parse-correlation-id-test-fail/13276/4 "2025-07-13T05:24:34Z")

</div>

Hey @zgy03916618421, looks like you’ve got past this stage. 🎉

Do you happen to remember what was wrong? Would love to see if we can improve the tester / instructions.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)
#### Post date: [July 18, 2025, 4:03pm UTC](https://forum.codecrafters.io/t/rust-parse-correlation-id-test-fail/13276/6 "2025-07-18T16:03:52Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
