fix connection refused error message
Signed-off-by: Manabu McCloskey <manabu.mccloskey@gmail.com>
This commit is contained in:
parent
873b838bd8
commit
c0e9899cd4
1 changed files with 1 additions and 5 deletions
|
|
@ -6,11 +6,7 @@ function onClientError(error: Error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onServerError(error: Error) {
|
function onServerError(error: Error) {
|
||||||
if (
|
if (error?.cause && JSON.stringify(error.cause).includes("ECONNREFUSED")) {
|
||||||
(error?.message &&
|
|
||||||
error.message.includes("Error POSTing to endpoint (HTTP 404)")) ||
|
|
||||||
(error?.cause && JSON.stringify(error.cause).includes("ECONNREFUSED"))
|
|
||||||
) {
|
|
||||||
console.error("Connection refused. Is the MCP server running?");
|
console.error("Connection refused. Is the MCP server running?");
|
||||||
} else {
|
} else {
|
||||||
console.error("Error from MCP server:", error);
|
console.error("Error from MCP server:", error);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue