abap-local-client 1.4.8 → 1.4.9
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/sso-sap-client.mjs +4 -1
package/package.json
CHANGED
package/sso-sap-client.mjs
CHANGED
|
@@ -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
|
-
|
|
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 {
|