secondbrainos-mcp-server 1.4.4 → 1.4.6

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.
Files changed (2) hide show
  1. package/build/index.js +7 -4
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -165,7 +165,8 @@ class SecondBrainOSServer {
165
165
  // Better error handling with HttpLlm
166
166
  if (axios.isAxiosError(error)) {
167
167
  const status = error.response?.status;
168
- const errorMessage = error.response?.data?.error || error.message;
168
+ const rawError = error.response?.data?.error || error.response?.data?.message || error.message;
169
+ const errorMessage = typeof rawError === 'object' ? JSON.stringify(rawError) : rawError;
169
170
  let mcpError;
170
171
  switch (status) {
171
172
  case 401:
@@ -191,16 +192,18 @@ class SecondBrainOSServer {
191
192
  isError: true
192
193
  };
193
194
  }
194
- else if (error instanceof Error) {
195
+ else {
196
+ const msg = error instanceof Error
197
+ ? error.message
198
+ : (typeof error === 'object' ? JSON.stringify(error) : String(error));
195
199
  return {
196
200
  content: [{
197
201
  type: 'text',
198
- text: `Error calling function: ${error.message}`
202
+ text: `Error calling function: ${msg}`
199
203
  }],
200
204
  isError: true
201
205
  };
202
206
  }
203
- throw error;
204
207
  }
205
208
  });
206
209
  // List available prompts (user's workflows + agents)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secondbrainos-mcp-server",
3
- "version": "1.4.4",
3
+ "version": "1.4.6",
4
4
  "description": "Second Brain OS MCP Server for Claude Desktop",
5
5
  "type": "module",
6
6
  "main": "build/index.js",