Skip to content

Commit

Permalink
fix: do not attempt to retry failing request (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
reey authored Dec 3, 2024
1 parent 32db3a9 commit 7505004
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ app.use("/s/:cloudProxyDeviceId/:cloudProxyConfigId/", async (req, res) => {
if (req.headers.upgrade) {
proxy.ws(req, req.socket, req.headers, undefined, (e) => {
requestLogger.error("Error while proxying WS", { error: e });
proxy.ws(req, req.socket, req.headers);
res.sendStatus(500);
});
return;
}
Expand All @@ -178,8 +178,7 @@ app.use("/s/:cloudProxyDeviceId/:cloudProxyConfigId/", async (req, res) => {
},
(e) => {
requestLogger.error("Error while proxying", { error: e });
// res.sendStatus(500);
proxy.web(req, res);
res.sendStatus(500);
}
);
} catch (e) {
Expand Down Expand Up @@ -209,7 +208,7 @@ app.use("/:cloudProxyDeviceId/:cloudProxyConfigId/", async (req, res) => {
if (req.headers.upgrade) {
proxy.ws(req, req.socket, req.headers, undefined, (e) => {
requestLogger.error("Error while proxying WS", { error: e });
proxy.ws(req, req.socket, req.headers);
res.sendStatus(500);
});
return;
}
Expand All @@ -225,8 +224,7 @@ app.use("/:cloudProxyDeviceId/:cloudProxyConfigId/", async (req, res) => {
},
(e) => {
requestLogger.error("Error while proxying", { error: e });
// res.sendStatus(500);
proxy.web(req, res);
res.sendStatus(500);
}
);
} catch (e) {
Expand Down

0 comments on commit 7505004

Please sign in to comment.