Skip to content

Commit b732ab4

Browse files
committed
prettier
1 parent 2df7238 commit b732ab4

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

server/src/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ app.get("/stdio", async (req, res) => {
259259
} catch (error) {
260260
if (error instanceof SseError && error.code === 401) {
261261
console.error(
262-
"Received 401 Unauthorized from MCP server. Authentication failure."
262+
"Received 401 Unauthorized from MCP server. Authentication failure.",
263263
);
264264
res.status(401).json(error);
265265
return;
@@ -305,7 +305,6 @@ app.get("/stdio", async (req, res) => {
305305
transportToClient: webAppTransport,
306306
transportToServer: serverTransport,
307307
});
308-
309308
} catch (error) {
310309
console.error("Error in /stdio route:", error);
311310
res.status(500).json(error);
@@ -323,7 +322,7 @@ app.get("/sse", async (req, res) => {
323322
} catch (error) {
324323
if (error instanceof SseError && error.code === 401) {
325324
console.error(
326-
"Received 401 Unauthorized from MCP server. Authentication failure."
325+
"Received 401 Unauthorized from MCP server. Authentication failure.",
327326
);
328327
res.status(401).json(error);
329328
return;
@@ -333,7 +332,7 @@ app.get("/sse", async (req, res) => {
333332
);
334333
res.status(404).json(error);
335334
return;
336-
} else if (JSON.stringify(error).includes("ECONNREFUSED")) {
335+
} else if (JSON.stringify(error).includes("ECONNREFUSED")) {
337336
console.error("Connection refused. Is the MCP server running?");
338337
res.status(500).json(error);
339338
} else {
@@ -355,7 +354,6 @@ app.get("/sse", async (req, res) => {
355354
transportToServer: serverTransport,
356355
});
357356
}
358-
359357
} catch (error) {
360358
console.error("Error in /sse route:", error);
361359
res.status(500).json(error);

server/src/mcpProxy.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ function onClientError(error: Error) {
66
}
77

88
function onServerError(error: Error) {
9-
if (
10-
(error?.message && error.message.includes("Error POSTing to endpoint (HTTP 404)")) ||
11-
(error?.cause && JSON.stringify(error.cause).includes('ECONNREFUSED'))
12-
) {
9+
if (
10+
(error?.message &&
11+
error.message.includes("Error POSTing to endpoint (HTTP 404)")) ||
12+
(error?.cause && JSON.stringify(error.cause).includes("ECONNREFUSED"))
13+
) {
1314
console.error("Connection refused. Is the MCP server running?");
1415
} else {
1516
console.error("Error from MCP server:", error);

0 commit comments

Comments
 (0)