starpc 0.9.1 → 0.9.2
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.
- package/dist/srpc/server-rpc.js +3 -0
- package/package.json +1 -1
- package/srpc/server-rpc.ts +3 -0
package/dist/srpc/server-rpc.js
CHANGED
|
@@ -15,6 +15,9 @@ export class ServerRPC extends CommonRPC {
|
|
|
15
15
|
if (!this.service || !this.method) {
|
|
16
16
|
throw new Error('rpcService and rpcMethod cannot be empty');
|
|
17
17
|
}
|
|
18
|
+
if (!this.lookupMethod) {
|
|
19
|
+
throw new Error('LookupMethod is not defined');
|
|
20
|
+
}
|
|
18
21
|
const methodDef = await this.lookupMethod(this.service, this.method);
|
|
19
22
|
if (!methodDef) {
|
|
20
23
|
throw new Error(`not found: ${this.service}/${this.method}`);
|
package/package.json
CHANGED
package/srpc/server-rpc.ts
CHANGED
|
@@ -25,6 +25,9 @@ export class ServerRPC extends CommonRPC {
|
|
|
25
25
|
if (!this.service || !this.method) {
|
|
26
26
|
throw new Error('rpcService and rpcMethod cannot be empty')
|
|
27
27
|
}
|
|
28
|
+
if (!this.lookupMethod) {
|
|
29
|
+
throw new Error('LookupMethod is not defined')
|
|
30
|
+
}
|
|
28
31
|
const methodDef = await this.lookupMethod(this.service, this.method)
|
|
29
32
|
if (!methodDef) {
|
|
30
33
|
throw new Error(`not found: ${this.service}/${this.method}`)
|