@moonpay/cli 0.6.12 → 0.6.13
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/dist/{chunk-2XX5YJ2D.js → chunk-AFUYZK7C.js} +15 -3
- package/dist/chunk-AFUYZK7C.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/{mcp-4U5K4DCI.js → mcp-BLERLDQJ.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-2XX5YJ2D.js.map +0 -1
- /package/dist/{mcp-4U5K4DCI.js.map → mcp-BLERLDQJ.js.map} +0 -0
|
@@ -235,9 +235,21 @@ async function callTool(baseUrl, toolName, params) {
|
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
|
|
238
|
+
if (res.status === 429) {
|
|
239
|
+
throw new Error("Rate limit exceeded. Please wait a moment and try again.");
|
|
240
|
+
}
|
|
239
241
|
if (res.status === 401) {
|
|
240
|
-
throw new Error("This command requires a MoonPay
|
|
242
|
+
throw new Error("This command requires a MoonPay CLI account. Run `moonpay login` first.");
|
|
243
|
+
}
|
|
244
|
+
const text = await res.text();
|
|
245
|
+
if (!text) {
|
|
246
|
+
throw new Error(`Empty response from server (${res.status})`);
|
|
247
|
+
}
|
|
248
|
+
let data;
|
|
249
|
+
try {
|
|
250
|
+
data = JSON.parse(text);
|
|
251
|
+
} catch {
|
|
252
|
+
throw new Error(`Unexpected response from server (${res.status})`);
|
|
241
253
|
}
|
|
242
254
|
if (res.status < 200 || res.status >= 300) {
|
|
243
255
|
const err = data;
|
|
@@ -7711,4 +7723,4 @@ export {
|
|
|
7711
7723
|
consentCheck,
|
|
7712
7724
|
LOCAL_TOOLS
|
|
7713
7725
|
};
|
|
7714
|
-
//# sourceMappingURL=chunk-
|
|
7726
|
+
//# sourceMappingURL=chunk-AFUYZK7C.js.map
|