From b3e08ac443d5d010938be7ae9b9bf8c04ca55300 Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 19 Jun 2023 20:56:06 +0200 Subject: Reject fetch promise on network error Instead of setting the non-standard res variable. --- src/display/client.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/display/client.nim') diff --git a/src/display/client.nim b/src/display/client.nim index af4b3fb2..1c9e0b1f 100644 --- a/src/display/client.nim +++ b/src/display/client.nim @@ -91,7 +91,7 @@ proc `=destroy`(client: var ClientObj) = proc doRequest(client: Client, req: Request): Response {.jsfunc.} = return client.loader.doRequest(req) -proc fetch(client: Client, req: Request): Promise[Response] {.jsfunc.} = +proc fetch(client: Client, req: Request): FetchPromise {.jsfunc.} = return client.loader.fetch(req) proc interruptHandler(rt: JSRuntime, opaque: pointer): int {.cdecl.} = -- cgit 1.4.1-2-gfad0