return correct errors from promises

This commit is contained in:
Halil Durak
2026-03-19 12:24:39 +03:00
parent 93e239f682
commit 94190f93af
11 changed files with 72 additions and 44 deletions

View File

@@ -243,7 +243,7 @@ fn httpErrorCallback(ctx: *anyopaque, err: anyerror) void {
defer ls.deinit();
// fetch() must reject with a TypeError on network errors per spec
ls.toLocal(self._resolver).rejectError("fetch error", .{ .type_error = @errorName(err) });
ls.toLocal(self._resolver).rejectError("fetch error", .{ .type_error = "fetch error" });
}
fn httpShutdownCallback(ctx: *anyopaque) void {