From b1a2ad6ae51cb041ecb8c1dc2c309102eb217d44 Mon Sep 17 00:00:00 2001 From: Umitcan Bal Date: Thu, 30 Nov 2023 14:21:18 +0100 Subject: [PATCH] return WebrpcRequestFailed for aborting --- _examples/golang-sse/webapp/src/rpc.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_examples/golang-sse/webapp/src/rpc.ts b/_examples/golang-sse/webapp/src/rpc.ts index c9aebd23..a1183ee2 100644 --- a/_examples/golang-sse/webapp/src/rpc.ts +++ b/_examples/golang-sse/webapp/src/rpc.ts @@ -126,7 +126,10 @@ export class Chat implements Chat { options.onError(error); } ).catch((error) => { - options.onError(error) + options.onError( + WebrpcRequestFailedError.new({ + cause: `fetch(): ${error.message || ""}`, + })) }) }; }