@kaddo/mcp 3.88.4 → 3.89.0
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/index.js +8 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11715,6 +11715,8 @@ function defaultMessageFor(code) {
|
|
|
11715
11715
|
return "The external provider is temporarily unavailable.";
|
|
11716
11716
|
case "INTEGRATION_TIMEOUT":
|
|
11717
11717
|
return "The external provider did not respond in time.";
|
|
11718
|
+
case "INTEGRATION_INVALID_QUERY":
|
|
11719
|
+
return "The query syntax is invalid. Check filter values or JQL.";
|
|
11718
11720
|
case "INTEGRATION_PROVIDER_ERROR":
|
|
11719
11721
|
return "The external provider returned an error.";
|
|
11720
11722
|
case "UNSUPPORTED_CAPABILITY":
|
|
@@ -12315,13 +12317,19 @@ async function handleJiraResponse(res) {
|
|
|
12315
12317
|
if (res.status >= 500) throw integrationError("INTEGRATION_UNAVAILABLE");
|
|
12316
12318
|
if (!res.ok) {
|
|
12317
12319
|
let detail = "";
|
|
12320
|
+
let isJqlError = false;
|
|
12318
12321
|
try {
|
|
12319
12322
|
const body = await res.json();
|
|
12320
12323
|
const msgs = body.errorMessages?.filter(Boolean) ?? [];
|
|
12321
12324
|
const fieldErrs = body.errors ? Object.entries(body.errors).map(([k2, v]) => `${k2}: ${v}`) : [];
|
|
12322
12325
|
detail = [...msgs, ...fieldErrs].join("; ");
|
|
12326
|
+
if (res.status === 400) {
|
|
12327
|
+
const combined = detail.toLowerCase();
|
|
12328
|
+
isJqlError = combined.includes("jql") || combined.includes("query") || combined.includes("field") || combined.includes("clause");
|
|
12329
|
+
}
|
|
12323
12330
|
} catch {
|
|
12324
12331
|
}
|
|
12332
|
+
if (isJqlError) throw integrationError("INTEGRATION_INVALID_QUERY");
|
|
12325
12333
|
throw integrationError("INTEGRATION_PROVIDER_ERROR", detail || `Jira responded with status ${res.status}.`);
|
|
12326
12334
|
}
|
|
12327
12335
|
return await res.json();
|
package/package.json
CHANGED