@debugg-ai/debugg-ai-mcp 2.9.1 → 2.9.3
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.
|
@@ -29,7 +29,9 @@ export const createWorkflowsService = (tx) => {
|
|
|
29
29
|
return match;
|
|
30
30
|
},
|
|
31
31
|
async findEvaluationTemplate() {
|
|
32
|
-
|
|
32
|
+
// 'app evaluation workflow' is specific enough to skip 'App Evaluation Brain'
|
|
33
|
+
// (subworkflow, no browser lifecycle) which also contains 'app evaluation'.
|
|
34
|
+
const keyword = process.env.DEBUGGAI_EVAL_TEMPLATE || 'app evaluation workflow';
|
|
33
35
|
return service.findTemplateByName(keyword);
|
|
34
36
|
},
|
|
35
37
|
async executeWorkflow(workflowUuid, contextData, env) {
|
|
@@ -29,9 +29,13 @@ export class AxiosTransport {
|
|
|
29
29
|
}, (err) => {
|
|
30
30
|
const data = err.response?.data;
|
|
31
31
|
if (data) {
|
|
32
|
+
const strField = (v) => typeof v === 'string' && v ? v : null;
|
|
32
33
|
const msg = typeof data === 'string'
|
|
33
34
|
? data
|
|
34
|
-
: data.detail
|
|
35
|
+
: strField(data.detail) ??
|
|
36
|
+
strField(data.message) ??
|
|
37
|
+
strField(data.error) ??
|
|
38
|
+
JSON.stringify(data);
|
|
35
39
|
const newErr = new Error(String(msg));
|
|
36
40
|
newErr.statusCode = err.response?.status;
|
|
37
41
|
newErr.responseData = data;
|
package/dist/utils/errors.js
CHANGED
|
@@ -95,8 +95,18 @@ export function handleExternalServiceError(error, serviceName, operation) {
|
|
|
95
95
|
originalError: error.message
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
// Non-Error thrown value — serialize properly so the caller can diagnose.
|
|
99
|
+
// String(plainObj) → "[object Object]"; JSON.stringify exposes the fields.
|
|
100
|
+
const serialized = (() => {
|
|
101
|
+
try {
|
|
102
|
+
return JSON.stringify(error);
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
return String(error);
|
|
106
|
+
}
|
|
107
|
+
})();
|
|
108
|
+
logger.error('Unknown external service error', { serviceName, operation, error: serialized });
|
|
109
|
+
return new MCPError(MCPErrorCode.EXTERNAL_SERVICE_ERROR, `${serviceName} error: ${serialized}`, { serviceName, operation, originalError: serialized });
|
|
100
110
|
}
|
|
101
111
|
/**
|
|
102
112
|
* Check if error is retryable
|