diff --git a/clientSSE.go.tmpl b/clientSSE.go.tmpl index 54eba7b..8875431 100644 --- a/clientSSE.go.tmpl +++ b/clientSSE.go.tmpl @@ -56,7 +56,7 @@ const sseResponse = async ( onError( WebrpcClientAbortedError.new({ message: "AbortError", - cause: `AbortError: ${error.message}`, + cause: `AbortError: ${error instanceof Error ? error.message : String(error)}`, }), () => { throw new Error("Abort signal cannot be used to reconnect")