We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 734b799 + be8bd9b commit 9afa99fCopy full SHA for 9afa99f
2 files changed
src/server/sse_server.cpp
@@ -511,6 +511,22 @@ bool SseServerWrapper::start()
511
return;
512
}
513
514
+ // JSON-RPC notifications (missing/null id) must not receive responses.
515
+ const bool is_notification = !message.contains("id") || message["id"].is_null();
516
+ if (is_notification)
517
+ {
518
+ try
519
520
+ (void)handler_(message); // process side effects only
521
+ }
522
+ catch (...)
523
524
+ // Ignore notification errors by design.
525
526
+ res.status = 202;
527
+ return;
528
529
+
530
// Normal request - process with handler
531
auto response = handler_(message);
532
0 commit comments