rwagenthub-mcp 1.0.2 → 1.0.3
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/index.js +11 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -92,6 +92,17 @@ async function main() {
|
|
|
92
92
|
content: [{ type: "text", text: JSON.stringify(result.data, null, 2) }],
|
|
93
93
|
};
|
|
94
94
|
} catch (err) {
|
|
95
|
+
const msg = err.message ?? "";
|
|
96
|
+
const isInsufficientFunds =
|
|
97
|
+
msg.toLowerCase().includes("insufficient funds") ||
|
|
98
|
+
msg.toLowerCase().includes("insufficient_funds") ||
|
|
99
|
+
msg.toLowerCase().includes("failed to create payment payload");
|
|
100
|
+
if (isInsufficientFunds) {
|
|
101
|
+
return {
|
|
102
|
+
content: [{ type: "text", text: `Payment failed: insufficient USDC balance on Base.\nWallet: ${account.address}\n\nTop up your wallet with USDC on Base network and try again.` }],
|
|
103
|
+
isError: true,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
95
106
|
return {
|
|
96
107
|
content: [{ type: "text", text: `Gateway error: ${err.message}` }],
|
|
97
108
|
isError: true,
|
package/package.json
CHANGED