use call arena for json in Req/Resp

This commit is contained in:
Muki Kiboigo
2025-09-08 07:49:04 -07:00
parent 618fff0191
commit bb2595eca5
2 changed files with 4 additions and 4 deletions

View File

@@ -220,11 +220,11 @@ pub fn _json(self: *Response, page: *Page) !Env.Promise {
const p = std.json.parseFromSliceLeaky(
std.json.Value,
page.arena,
page.call_arena,
self.body,
.{},
) catch |e| {
log.warn(.browser, "invalid json", .{ .err = e, .source = "Request" });
log.info(.browser, "invalid json", .{ .err = e, .source = "Request" });
return error.SyntaxError;
};

View File

@@ -154,11 +154,11 @@ pub fn _json(self: *Response, page: *Page) !Env.Promise {
const p = std.json.parseFromSliceLeaky(
std.json.Value,
page.arena,
page.call_arena,
self.body,
.{},
) catch |e| {
log.warn(.browser, "invalid json", .{ .err = e, .source = "fetch" });
log.info(.browser, "invalid json", .{ .err = e, .source = "Response" });
return error.SyntaxError;
};