summaryrefslogtreecommitdiff
path: root/frontend/src/wsrouter.ts
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2024-05-04 22:39:30 -0400
committerAAGaming <aagaming@riseup.net>2024-05-04 22:39:30 -0400
commit14ea7b964f65460c08f39d42e1621aabd1db22fc (patch)
tree42b62d1eb69a94aa80c1cacb8c89d549c21cf86c /frontend/src/wsrouter.ts
parent2a22f000c12bd3704a93e897ed71e644392baeef (diff)
downloaddecky-loader-14ea7b964f65460c08f39d42e1621aabd1db22fc.tar.gz
decky-loader-14ea7b964f65460c08f39d42e1621aabd1db22fc.zip
implement fetch and external resource request apis
Diffstat (limited to 'frontend/src/wsrouter.ts')
-rw-r--r--frontend/src/wsrouter.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/wsrouter.ts b/frontend/src/wsrouter.ts
index 34184a7f..643d24f5 100644
--- a/frontend/src/wsrouter.ts
+++ b/frontend/src/wsrouter.ts
@@ -30,7 +30,7 @@ interface ReplyMessage {
interface ErrorMessage {
type: MessageType.ERROR;
- error: { name: string; message: string; traceback: string | null };
+ error: { name: string; error: string; traceback: string | null };
id: number;
}
@@ -40,8 +40,8 @@ interface ErrorMessage {
export class PyError extends Error {
pythonTraceback: string | null;
- constructor(name: string, message: string, traceback: string | null) {
- super(message);
+ constructor(name: string, error: string, traceback: string | null) {
+ super(error);
this.name = `Python ${name}`;
if (traceback) {
// traceback will always start with `Traceback (most recent call last):`
@@ -142,7 +142,7 @@ export class WSRouter extends Logger {
case MessageType.ERROR:
if (this.runningCalls.has(data.id)) {
- let err = new PyError(data.error.name, data.error.message, data.error.traceback);
+ let err = new PyError(data.error.name, data.error.error, data.error.traceback);
this.runningCalls.get(data.id)!.reject(err);
this.runningCalls.delete(data.id);
this.debug(`Rejected PY call ${data.id} with error`, data.error);