Skip to content

Commit c122ff5

Browse files
committed
Merge branch 'master' of https://github.com/timonson/gentle_rpc
2 parents dd3cebd + 14ab53a commit c122ff5

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@ const notification = await remote.sayHello.notify(["World"])
7979
// undefined
8080
```
8181

82+
##### auth
83+
84+
This method will set the `Authorization` header to `` `Bearer ${jwt}` ``.
85+
86+
```typescript
87+
const greeting = await remote.sayHello.auth(jwt)(["World"])
88+
// Hello World
89+
```
90+
8291
##### batch
8392

8493
```typescript
@@ -91,15 +100,6 @@ const noise1 = await remote.animalsMakeNoise.batch([
91100
// [ "MIAAOW", "WUUUUFU WUUUUFU", "IAAAIAIA IAAAIAIA IAAAIAIA", "FIIIIIRE" ]
92101
```
93102

94-
##### auth
95-
96-
This method will set the `Authorization` header to `Bearer ${jwt}`.
97-
98-
```typescript
99-
const greeting = await remote.sayHello.auth(jwt)(["World"])
100-
// Hello World
101-
```
102-
103103
##### batch with different methods
104104

105105
Takes either a `batchObject` or a `batchArray` as argument and returns a

client/error.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ export class BadServerDataError extends Error {
77
data?: unknown;
88
constructor(id: RpcId, message: string, errorCode: number, data?: unknown) {
99
super(message);
10-
this.id = id, this.name = this.constructor.name;
10+
this.id = id;
11+
this.name = this.constructor.name;
1112
this.code = errorCode;
1213
this.data = data;
1314
}

0 commit comments

Comments
 (0)