mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-28 07:33:16 +00:00
mcp: send error response when message is too long
This commit is contained in:
@@ -16,6 +16,7 @@ pub fn processRequests(server: *Server, reader: *std.io.Reader) !void {
|
||||
const buffered_line = reader.takeDelimiter('\n') catch |err| switch (err) {
|
||||
error.StreamTooLong => {
|
||||
log.err(.mcp, "Message too long", .{});
|
||||
try server.sendError(.null, .InvalidRequest, "Message too long");
|
||||
continue;
|
||||
},
|
||||
else => return err,
|
||||
|
||||
Reference in New Issue
Block a user