@trpc/client 10.0.0-alpha.49 → 10.0.0-alpha.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -200,7 +200,7 @@ function httpBatchLink(opts) {
200
200
  result: transformed.result
201
201
  });
202
202
  observer.complete();
203
- }).catch((err)=>observer.error(err));
203
+ }).catch((err)=>observer.error(transformResult.TRPCClientError.from(err)));
204
204
  return ()=>{
205
205
  cancel();
206
206
  };
@@ -196,7 +196,7 @@ function httpBatchLink(opts) {
196
196
  result: transformed.result
197
197
  });
198
198
  observer.complete();
199
- }).catch((err)=>observer.error(err));
199
+ }).catch((err)=>observer.error(TRPCClientError.from(err)));
200
200
  return ()=>{
201
201
  cancel();
202
202
  };
@@ -30,7 +30,7 @@ function httpLink(opts) {
30
30
  result: transformed.result
31
31
  });
32
32
  observer.complete();
33
- }).catch((cause)=>transformResult.TRPCClientError.from(cause));
33
+ }).catch((cause)=>observer.error(transformResult.TRPCClientError.from(cause)));
34
34
  return ()=>{
35
35
  cancel();
36
36
  };
@@ -26,7 +26,7 @@ function httpLink(opts) {
26
26
  result: transformed.result
27
27
  });
28
28
  observer.complete();
29
- }).catch((cause)=>TRPCClientError.from(cause));
29
+ }).catch((cause)=>observer.error(TRPCClientError.from(cause)));
30
30
  return ()=>{
31
31
  cancel();
32
32
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/client",
3
- "version": "10.0.0-alpha.49",
3
+ "version": "10.0.0-alpha.51",
4
4
  "description": "tRPC Client lib",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -63,13 +63,13 @@
63
63
  "ts-watch": "tsc --project tsconfig.watch.json"
64
64
  },
65
65
  "peerDependencies": {
66
- "@trpc/server": "10.0.0-alpha.49"
66
+ "@trpc/server": "10.0.0-alpha.51"
67
67
  },
68
68
  "devDependencies": {
69
- "@trpc/server": "10.0.0-alpha.49"
69
+ "@trpc/server": "10.0.0-alpha.51"
70
70
  },
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "6debc556a75f0f92396fc98630b8d93840965bc7"
74
+ "gitHead": "b16490d4ad0523b8380e6fb5e2446da3cfe9e273"
75
75
  }
@@ -101,7 +101,7 @@ export function httpBatchLink<TRouter extends AnyRouter>(
101
101
  });
102
102
  observer.complete();
103
103
  })
104
- .catch((err) => observer.error(err as any));
104
+ .catch((err) => observer.error(TRPCClientError.from(err)));
105
105
 
106
106
  return () => {
107
107
  cancel();
@@ -38,7 +38,7 @@ export function httpLink<TRouter extends AnyRouter>(
38
38
  });
39
39
  observer.complete();
40
40
  })
41
- .catch((cause) => TRPCClientError.from(cause));
41
+ .catch((cause) => observer.error(TRPCClientError.from(cause)));
42
42
 
43
43
  return () => {
44
44
  cancel();