sap-adt-mcp 0.8.48 → 0.8.49
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/package.json +1 -1
- package/src/adt-client.js +8 -1
- package/src/reporter.js +8 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sap-adt-mcp",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.49",
|
|
4
4
|
"mcpName": "io.github.yzonur/sap-adt-mcp",
|
|
5
5
|
"description": "MCP server giving Claude live access to SAP systems via ADT (ABAP Development Tools) REST. Read source, search, run syntax checks, and edit ABAP objects from any MCP-compatible client.",
|
|
6
6
|
"type": "module",
|
package/src/adt-client.js
CHANGED
|
@@ -168,8 +168,15 @@ export class AdtClient {
|
|
|
168
168
|
const token = res.headers.get("x-csrf-token");
|
|
169
169
|
if (!token || token.toLowerCase() === "required") {
|
|
170
170
|
const body = await res.text().catch(() => "");
|
|
171
|
+
// An HTML body means the host answered with a web page (SSO/login form or a
|
|
172
|
+
// web-dispatcher error), not the ADT service — usually a wrong host/system
|
|
173
|
+
// or a system fronted by SSO that basic auth can't pass.
|
|
174
|
+
const looksHtml = /^\s*<(!doctype html|html\b)/i.test(body);
|
|
175
|
+
const hint = looksHtml
|
|
176
|
+
? " — the host returned an HTML page (likely an SSO/login page or wrong host), not the ADT service. Check the system's host and that it accepts basic-auth ADT access."
|
|
177
|
+
: "";
|
|
171
178
|
throw new Error(
|
|
172
|
-
`Failed to fetch CSRF token (status ${res.status}): ${body.slice(0, 200)}`
|
|
179
|
+
`Failed to fetch CSRF token (status ${res.status})${hint}: ${body.slice(0, 200)}`
|
|
173
180
|
);
|
|
174
181
|
}
|
|
175
182
|
this.csrfToken = token;
|
package/src/reporter.js
CHANGED
|
@@ -32,7 +32,11 @@ const SKIP_NAMES = new Set(["ReadOnlyViolationError", "AbortError"]);
|
|
|
32
32
|
// Configuration / setup mistakes and input-validation errors — the user's
|
|
33
33
|
// environment or a mis-shaped tool call, not a bug in the tool.
|
|
34
34
|
const SKIP_MESSAGE_RE =
|
|
35
|
-
|
|
35
|
+
// "Failed to fetch CSRF token": the host didn't behave like an ADT endpoint
|
|
36
|
+
// (SSO/login page, web dispatcher, wrong host/system) — environmental/auth, not
|
|
37
|
+
// a tool defect. The CSRF fetch is a fixed simple GET, so it never mis-shapes a
|
|
38
|
+
// request on our side (#62, and the deleted #58-60 cluster).
|
|
39
|
+
/(No config found|must be a non-empty string|env var .* is not set|No system specified|Unknown system '|No systems configured|password must be a string|Failed to parse config|is required\b|Unsupported object type|ADT request failed|ADT request timed out|fetch failed|Failed to fetch CSRF token)/i;
|
|
36
40
|
|
|
37
41
|
// Network / TLS problems live on the user's side (firewall, VPN, cert, host down).
|
|
38
42
|
const NETWORK_CODES = new Set([
|
|
@@ -177,7 +181,9 @@ const BUSINESS_T100 = new Set([
|
|
|
177
181
|
"ADT_DATAPREVIEW_MSG",
|
|
178
182
|
]);
|
|
179
183
|
const BUSINESS_TYPE_RE =
|
|
180
|
-
|
|
184
|
+
// NoDependencyGraphDataCalculationPossible: SAP can't compute the dependency
|
|
185
|
+
// graph for a given CDS entity (system/data-side, not a tool defect — see #22/#61).
|
|
186
|
+
/SaveFailure|Lock|Enqueue|CTS_|ExceptionResourceAlreadyExists|NotFound|NoDependencyGraphDataCalculation/i;
|
|
181
187
|
|
|
182
188
|
// Decide whether a non-2xx ADT response that a handler returned (not threw) is
|
|
183
189
|
// likely a defect in *this* tool rather than a user/business condition. Errs
|