@ekhein/sekiro-node-client 2.1.12 → 2.1.13
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/main.js +10 -4
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -28,10 +28,16 @@ class SekiroClient extends ws_util_1.W3CWebSocket {
|
|
|
28
28
|
if (!handler)
|
|
29
29
|
throw new Error("Handler Not Found");
|
|
30
30
|
const body = await handler.call(this, request.params);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
if (body?.jsonrpc) {
|
|
32
|
+
if (body.error)
|
|
33
|
+
throw new Error(body.error.message);
|
|
34
|
+
const pack = result_util_1.Result.success(request, body.result);
|
|
35
|
+
this.send(pack);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
const pack = result_util_1.Result.success(request, body);
|
|
39
|
+
this.send(pack);
|
|
40
|
+
}
|
|
35
41
|
}
|
|
36
42
|
catch (error) {
|
|
37
43
|
const pack = result_util_1.Result.unknown(request, error.message);
|