Skip to content

Commit

Permalink
Merge pull request #4326 from GordonSmith/EXTRA_FETCH_ERRORHANDLING_3
Browse files Browse the repository at this point in the history
feat: Allow fetch exceptions to propogate up the stack
  • Loading branch information
GordonSmith authored Jan 21, 2025
2 parents ed4453e + 1ce39f6 commit 348b5e0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
8 changes: 0 additions & 8 deletions packages/comms/src/espConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,6 @@ export class ESPConnection implements IConnection {
return retVal;
}
return response;
}).catch(e => {
if (e.isESPExceptions) {
throw e;
}
throw new ESPExceptions(action, request, {
Source: "ESPConnection.send",
Exception: [{ Code: 0, Message: e.message }]
});
});
}

Expand Down
4 changes: 1 addition & 3 deletions packages/comms/src/services/wsWorkunits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ export class WorkunitsService extends WorkunitsServiceBase {
}

Ping(): Promise<WsWorkunits.WsWorkunitsPingResponse> {
return this._connection.send("Ping", {}, "json", false, undefined, "WsWorkunitsPingResponse").then((response) => {
return this._connection.send("Ping", {}, "json", false, undefined, "WsWorkunitsPingResponse").then(() => {
return { result: true };
}).catch((e: Error) => {
return { result: false, error: e };
});
}

Expand Down

0 comments on commit 348b5e0

Please sign in to comment.