From 241063f7ffb9583ba9b3438b32a82fcec3cf32a3 Mon Sep 17 00:00:00 2001 From: akbash Date: Fri, 18 Sep 2026 17:41:56 +0300 Subject: fix: preserve request ids in socket error responses (#4353) * fix: preserve request ids in socket error responses refs #4344 * docs: clarify socket error response limits refs #4344 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> --- docs/next/website/src/content/docs/socket-api.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs') diff --git a/docs/next/website/src/content/docs/socket-api.mdx b/docs/next/website/src/content/docs/socket-api.mdx index 5bd933dd..84068cea 100644 --- a/docs/next/website/src/content/docs/socket-api.mdx +++ b/docs/next/website/src/content/docs/socket-api.mdx @@ -670,6 +670,11 @@ A successful response includes the same `id`: {"id":"req_1","result":{"type":"pong"}} ``` +For request lines that reach JSON decoding, error responses also echo the request's +`id`, including when the method or parameters are invalid. If the JSON is invalid +or has no unambiguous top-level string `id`, the error response uses an empty `id`. +Transport errors, such as invalid UTF-8, can close the connection without a response. + Event subscriptions keep the connection open after the initial response. ## Socket paths @@ -814,6 +819,9 @@ Subscribe to events when you need a long-lived stream: ``` The first response acknowledges the subscription. Later lines are pushed events. +All entries must be valid: if any referenced pane does not exist, Herdr rejects +the entire request with an error and closes the connection. Refresh the pane list +and retry rather than assuming the other entries were subscribed. Lifecycle subscriptions start when the request is accepted and do not replay events retained before that point. -- cgit v1.2.3