Skip to content

Commit 348b5e0

Browse files
authored
Merge pull request hpcc-systems#4326 from GordonSmith/EXTRA_FETCH_ERRORHANDLING_3
feat: Allow fetch exceptions to propogate up the stack
2 parents ed4453e + 1ce39f6 commit 348b5e0

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

packages/comms/src/espConnection.ts

-8
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,6 @@ export class ESPConnection implements IConnection {
138138
return retVal;
139139
}
140140
return response;
141-
}).catch(e => {
142-
if (e.isESPExceptions) {
143-
throw e;
144-
}
145-
throw new ESPExceptions(action, request, {
146-
Source: "ESPConnection.send",
147-
Exception: [{ Code: 0, Message: e.message }]
148-
});
149141
});
150142
}
151143

packages/comms/src/services/wsWorkunits.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,8 @@ export class WorkunitsService extends WorkunitsServiceBase {
6868
}
6969

7070
Ping(): Promise<WsWorkunits.WsWorkunitsPingResponse> {
71-
return this._connection.send("Ping", {}, "json", false, undefined, "WsWorkunitsPingResponse").then((response) => {
71+
return this._connection.send("Ping", {}, "json", false, undefined, "WsWorkunitsPingResponse").then(() => {
7272
return { result: true };
73-
}).catch((e: Error) => {
74-
return { result: false, error: e };
7573
});
7674
}
7775

0 commit comments

Comments
 (0)