abap-local-client 1.4.8 → 1.4.10

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 CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "abap-local-client",
3
- "version": "1.4.8",
3
+ "version": "1.4.10",
4
4
  "description": "SAP Local Client — WebSocket bridge with Basic, SPNEGO, X.509, SAML & SNC authentication",
5
5
  "main": "sso-sap-client.mjs",
6
6
  "type": "module",
7
+ "bin": {
8
+ "abap-local-client": "sso-sap-client.mjs"
9
+ },
7
10
  "scripts": {
8
11
  "start": "node sso-sap-client.mjs",
9
12
  "sso": "node sso-sap-client.mjs",
@@ -591,7 +591,10 @@ class SAPClient {
591
591
  // Extract the real SAP error message from the XML body (exc:exception, etc.)
592
592
  const { hasErrors, errorMessages } = parseSAPResponse(rawBody || '');
593
593
  const sapError = hasErrors ? errorMessages.join('; ') : null;
594
- const errorMsg = sapError || error.message;
594
+ // Precedence: parsed SAP message > raw XML body > Axios generic message
595
+ // Sending rawBody as fallback ensures the MCP server always gets the full SAP response
596
+ // even when parseSAPResponse doesn't recognise the XML format.
597
+ const errorMsg = sapError || rawBody || error.message;
595
598
  if (sapError) console.error(` ❌ SAP error: ${sapError}`);
596
599
 
597
600
  return {