@mintline/mcp 1.1.0 → 1.1.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -21,9 +21,15 @@ function createClient(apiKey2) {
21
21
  },
22
22
  body: body ? JSON.stringify(body) : void 0
23
23
  });
24
- const data = await res.json();
24
+ let data;
25
+ try {
26
+ data = await res.json();
27
+ } catch {
28
+ throw new Error(`HTTP ${res.status}: ${res.statusText}`);
29
+ }
25
30
  if (!data.success) {
26
- throw new Error(data.error?.message || "Request failed");
31
+ const errorMsg = data.error?.message || data.message || `Request failed (${res.status})`;
32
+ throw new Error(errorMsg);
27
33
  }
28
34
  return data;
29
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintline/mcp",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "MCP server for Mintline - connect AI assistants to your receipts and transactions",
5
5
  "main": "dist/index.js",
6
6
  "bin": {