Skip to content

test: verify PUT with msgpack body works against Chat API#2186

Closed
umair-ably wants to merge 1 commit intomainfrom
test/chat-put-msgpack
Closed

test: verify PUT with msgpack body works against Chat API#2186
umair-ably wants to merge 1 commit intomainfrom
test/chat-put-msgpack

Conversation

@umair-ably
Copy link

Summary

  • Adds request_chat_put_msgpack test that sends a chat message (POST) then updates it (PUT), both via rest.request()
  • Runs on both JSON and msgpack protocols via testOnJsonMsgpack

Context

The Chat SDK's integration tests show that messages.update() (PUT) fails with "cannot decode request body" when useBinaryProtocol: true, while messages.send() (POST) works fine. See: ably/ably-chat-js#721

This test isolates whether the issue is in ably-js's request() method or in how chat-js calls it:

  • If this passes but chat-js fails → issue is in chat-js
  • If both fail → issue is infrastructure/server-side

Companion PRs:

Test plan

  • request_chat_put_msgpack passes with both JSON and msgpack protocols

Add a test that sends a chat message (POST) then updates it (PUT),
both via rest.request(), running on both JSON and msgpack protocols
via testOnJsonMsgpack.

This tests the full request path through infrastructure to verify
that Content-Type and body encoding are preserved for PUT requests
with msgpack. If this test passes but the equivalent chat-js test
fails, the issue is in how chat-js calls realtime.request(). If
both fail, the issue is infrastructure-level.
@coderabbitai
Copy link

coderabbitai bot commented Mar 25, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 25bb6873-9ae8-4f19-bf35-7929ea566b5f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/chat-put-msgpack

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant