@mastra/mcp 1.0.0-beta.5 → 1.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/client/client.d.ts +1 -0
- package/dist/client/client.d.ts.map +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -729,6 +729,7 @@ var InternalMastraMCPClient = class extends MastraBase {
|
|
|
729
729
|
* Common session-related errors include:
|
|
730
730
|
* - "No valid session ID provided" (HTTP 400)
|
|
731
731
|
* - "Server not initialized" (HTTP 400)
|
|
732
|
+
* - "Not connected" (protocol state error)
|
|
732
733
|
* - Connection refused errors
|
|
733
734
|
*
|
|
734
735
|
* @param error - The error to check
|
|
@@ -741,7 +742,7 @@ var InternalMastraMCPClient = class extends MastraBase {
|
|
|
741
742
|
return false;
|
|
742
743
|
}
|
|
743
744
|
const errorMessage = error.message.toLowerCase();
|
|
744
|
-
return errorMessage.includes("no valid session") || errorMessage.includes("session") || errorMessage.includes("server not initialized") || errorMessage.includes("http 400") || errorMessage.includes("http 401") || errorMessage.includes("http 403") || errorMessage.includes("econnrefused") || errorMessage.includes("fetch failed") || errorMessage.includes("connection refused");
|
|
745
|
+
return errorMessage.includes("no valid session") || errorMessage.includes("session") || errorMessage.includes("server not initialized") || errorMessage.includes("not connected") || errorMessage.includes("http 400") || errorMessage.includes("http 401") || errorMessage.includes("http 403") || errorMessage.includes("econnrefused") || errorMessage.includes("fetch failed") || errorMessage.includes("connection refused");
|
|
745
746
|
}
|
|
746
747
|
/**
|
|
747
748
|
* Forces a reconnection to the MCP server by disconnecting and reconnecting.
|