# Redis Challenge #FY6. Failing with "expected simple string"

**URL:** <https://forum.codecrafters.io/t/redis-challenge-fy6-failing-with-expected-simple-string/16079>\
**Category:** Challenges\
**Tags:** challenge:redis\
**Created:** [April 29, 2026, 4:43pm UTC](https://forum.codecrafters.io/t/redis-challenge-fy6-failing-with-expected-simple-string/16079 "2026-04-29T16:43:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![var-nan](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/var-nan/32/25166_2.png) [@var-nan](https://forum.codecrafters.io/u/var-nan)\
**Post date:** [April 29, 2026, 4:43pm UTC](https://forum.codecrafters.io/t/redis-challenge-fy6-failing-with-expected-simple-string/16079/1 "2026-04-29T16:43:05Z")

</div>

I’m stuck on Redis challenge, #FY6

The specification mentioned that the response of `EXEC` command is an array of responses of all commands in the transaction. But my test cases are failing with an error message “expected Simple string, found bulk string”

Here are my logs:

```auto
[tester::#FY6] Running tests for Stage #FY6 (Transactions - Executing a transaction)
[tester::#FY6] $ ./your_program.sh
[your_program] Server is ready to accept connections 
[your_program] Client Connected: 127.0.0.1
[tester::#FY6] [client-1] Connected (port 33522 -> port 6379)
[tester::#FY6] [client-2] Connected (port 33538 -> port 6379)
[tester::#FY6] [client-1] $ redis-cli MULTI
[tester::#FY6] [client-1] Sent bytes: "*1\r\n$5\r\nMULTI\r\n"
[your_program] Client Connected: 127.0.0.1
[tester::#FY6] [client-1] Received bytes: "+OK\r\n"
[tester::#FY6] [client-1] Received RESP simple string: "OK"
[tester::#FY6] [client-1] ✔︎ Received "OK"
[tester::#FY6] Sending command: 1/4
[tester::#FY6] [client-1] > SET grape 16
[tester::#FY6] [client-1] Sent bytes: "*3\r\n$3\r\nSET\r\n$5\r\ngrape\r\n$2\r\n16\r\n"
[tester::#FY6] [client-1] Received bytes: "+QUEUED\r\n"
[tester::#FY6] [client-1] Received RESP simple string: "QUEUED"
[tester::#FY6] [client-1] ✔︎ Received "QUEUED"
[tester::#FY6] Sending command: 2/4
[tester::#FY6] [client-1] > INCR grape
[tester::#FY6] [client-1] Sent bytes: "*2\r\n$4\r\nINCR\r\n$5\r\ngrape\r\n"
[tester::#FY6] [client-1] Received bytes: "+QUEUED\r\n"
[tester::#FY6] [client-1] Received RESP simple string: "QUEUED"
[tester::#FY6] [client-1] ✔︎ Received "QUEUED"
[tester::#FY6] Sending command: 3/4
[tester::#FY6] [client-1] > INCR strawberry
[tester::#FY6] [client-1] Sent bytes: "*2\r\n$4\r\nINCR\r\n$10\r\nstrawberry\r\n"
[tester::#FY6] [client-1] Received bytes: "+QUEUED\r\n"
[tester::#FY6] [client-1] Received RESP simple string: "QUEUED"
[tester::#FY6] [client-1] ✔︎ Received "QUEUED"
[tester::#FY6] Sending command: 4/4
[tester::#FY6] [client-1] > GET strawberry
[tester::#FY6] [client-1] Sent bytes: "*2\r\n$3\r\nGET\r\n$10\r\nstrawberry\r\n"
[tester::#FY6] [client-1] Received bytes: "+QUEUED\r\n"
[tester::#FY6] [client-1] Received RESP simple string: "QUEUED"
[tester::#FY6] [client-1] ✔︎ Received "QUEUED"
[tester::#FY6] [client-1] > EXEC
[tester::#FY6] [client-1] Sent bytes: "*1\r\n$4\r\nEXEC\r\n"
[tester::#FY6] [client-1] Received bytes: "*4\r\n$5\r\n+OK\r\n\r\n$5\r\n:17\r\n\r\n$4\r\n:1\r\n\r\n$7\r\n$1\r\n1\r\n\r\n"
[tester::#FY6] [client-1] Received RESP array: [
[tester::#FY6] [client-1] "+OK\r\n",
[tester::#FY6] [client-1] ":17\r\n",
[tester::#FY6] [client-1] ":1\r\n",
[tester::#FY6] [client-1] "$1\r\n1\r\n"
[tester::#FY6] [client-1] ]
[tester::#FY6] Expected simple string, found bulk string
[tester::#FY6] Test failed
[tester::#FY6] Terminating program
[tester::#FY6] Program terminated successfully

```

the 4th command is `GET strawberry` and it returns “1” as a bulk string. I couldn’t figure out why this test fails.

---

<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:** [April 30, 2026, 3:21am UTC](https://forum.codecrafters.io/t/redis-challenge-fy6-failing-with-expected-simple-string/16079/3 "2026-04-30T03:21:06Z")

</div>

Hey @var-nan, could you [upload your code to GitHub](https://docs.codecrafters.io/features/publish-to-github) and share the link? It will be much easier to debug if I can run it directly.

---

<div class="post-metadata">

**Author:** ![var-nan](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/var-nan/32/25166_2.png) [@var-nan](https://forum.codecrafters.io/u/var-nan)\
**Post date:** [April 30, 2026, 3:35am UTC](https://forum.codecrafters.io/t/redis-challenge-fy6-failing-with-expected-simple-string/16079/4 "2026-04-30T03:35:44Z")

</div>

Hi @andy1li , sure. [Github link.](https://github.com/var-nan/redis-cpp/blob/main/src/Command.cpp) Thanks for your time.

---

<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:** [April 30, 2026, 8:22am UTC](https://forum.codecrafters.io/t/redis-challenge-fy6-failing-with-expected-simple-string/16079/6 "2026-04-30T08:22:48Z")

</div>

There might be multiple issues at play, but the first thing I noticed is that you don’t need to re-encode the `cmd_results`, since each command’s response is already RESP-encoded.

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/1/714ded31beac0c507d0dc2ab1b451788ac6db421.png)

Let me know if you’d like any further clarification!

---

<div class="post-metadata">

**Author:** ![var-nan](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/var-nan/32/25166_2.png) [@var-nan](https://forum.codecrafters.io/u/var-nan)\
**Post date:** [April 30, 2026, 11:53am UTC](https://forum.codecrafters.io/t/redis-challenge-fy6-failing-with-expected-simple-string/16079/8 "2026-04-30T11:53:35Z")

</div>

Thanks for your help. It worked.

---

<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:** [May 5, 2026, 11:53am UTC](https://forum.codecrafters.io/t/redis-challenge-fy6-failing-with-expected-simple-string/16079/9 "2026-05-05T11:53:46Z")

</div>

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