@utaba/ucm-mcp-server 4.3.0 → 4.3.1

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.
@@ -14,7 +14,16 @@ export class BaseToolController {
14
14
  return await this.handleExecute(params);
15
15
  }
16
16
  catch (error) {
17
- this.logger.error('BaseToolController', `Tool ${this.name} execution failed`, '', error);
17
+ // Sanitize error for logging to avoid circular reference issues with axios errors
18
+ const sanitizedError = {
19
+ message: error?.message,
20
+ name: error?.name,
21
+ status: error?.response?.status,
22
+ statusText: error?.response?.statusText,
23
+ data: error?.response?.data,
24
+ url: error?.config?.url
25
+ };
26
+ this.logger.error('BaseToolController', `Tool ${this.name} execution failed`, '', sanitizedError);
18
27
  throw error;
19
28
  }
20
29
  }
@@ -64,7 +64,13 @@ export class SharePointListConnectionsTool extends BaseToolController {
64
64
  return result;
65
65
  }
66
66
  catch (error) {
67
- this.logger.error('SharePointListConnectionsTool: Failed to list connections', error);
67
+ // Sanitize error for logging to avoid circular reference issues
68
+ const sanitizedError = {
69
+ message: error?.message,
70
+ status: error?.response?.status,
71
+ data: error?.response?.data
72
+ };
73
+ this.logger.error('SharePointListConnectionsTool', 'Failed to list connections', '', sanitizedError);
68
74
  if (error instanceof McpError) {
69
75
  throw error;
70
76
  }
@@ -84,7 +84,13 @@ export class SharePointReadRelatedFileTool extends BaseToolController {
84
84
  };
85
85
  }
86
86
  catch (error) {
87
- this.logger.error('SharePointReadRelatedFileTool', 'Read related file operation failed', '', error);
87
+ // Sanitize error for logging to avoid circular reference issues
88
+ const sanitizedError = {
89
+ message: error?.message,
90
+ status: error?.response?.status,
91
+ data: error?.response?.data
92
+ };
93
+ this.logger.error('SharePointReadRelatedFileTool', 'Read related file operation failed', '', sanitizedError);
88
94
  // Format error response
89
95
  if (error?.response?.status === 404) {
90
96
  throw new McpError(McpErrorCode.InvalidParams, 'Related file not found. File may no longer be available. Re-read the parent document to access related files.');
@@ -52,7 +52,13 @@ export class SharePointSignOutTool extends BaseToolController {
52
52
  return markdown;
53
53
  }
54
54
  catch (error) {
55
- this.logger.error('SharePointSignOutTool: Failed to revoke authorization', error);
55
+ // Sanitize error for logging to avoid circular reference issues
56
+ const sanitizedError = {
57
+ message: error?.message,
58
+ status: error?.response?.status,
59
+ data: error?.response?.data
60
+ };
61
+ this.logger.error('SharePointSignOutTool', 'Failed to revoke authorization', '', sanitizedError);
56
62
  if (error instanceof McpError) {
57
63
  throw error;
58
64
  }
@@ -12,7 +12,15 @@ export class SharePointErrorHandler {
12
12
  * @returns ToolResult for authentication errors, throws McpError for others
13
13
  */
14
14
  static handle(error, logger, toolName) {
15
- logger.error(toolName, 'SharePoint operation failed', '', error);
15
+ // Extract only serializable error details for logging to avoid circular reference issues
16
+ const sanitizedError = {
17
+ message: error?.message,
18
+ status: error?.response?.status,
19
+ statusText: error?.response?.statusText,
20
+ data: error?.response?.data,
21
+ url: error?.config?.url
22
+ };
23
+ logger.error(toolName, 'SharePoint operation failed', '', sanitizedError);
16
24
  const serverError = error?.response?.data;
17
25
  // Handle SharePoint authentication required (OnBehalfOf flow)
18
26
  if (error?.response?.status === 401 && serverError?.error === 'SHAREPOINT_LOGIN_REQUIRED') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utaba/ucm-mcp-server",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "description": "Universal Context Manager MCP Server - AI-native artifact management",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ucm-mcp-server",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "description": "Universal Context Manager MCP Server - AI-native artifact management",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",