togello-mcp-server 1.0.21 → 1.0.22
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/build/client.js +10 -3
- package/package.json +1 -1
package/build/client.js
CHANGED
|
@@ -35,7 +35,12 @@ export const httpClient = {
|
|
|
35
35
|
if (!response.ok) {
|
|
36
36
|
throw new Error(`response status: ${response.status}`);
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
// 空レスポンスの堅牢な処理
|
|
39
|
+
const text = await response.text();
|
|
40
|
+
if (!text || text.trim() === '') {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
return JSON.parse(text);
|
|
39
44
|
},
|
|
40
45
|
putJson: async ({ path, body }) => {
|
|
41
46
|
const token = process.env.TOGELLO_API_TOKEN;
|
|
@@ -55,9 +60,11 @@ export const httpClient = {
|
|
|
55
60
|
if (!response.ok) {
|
|
56
61
|
throw new Error(`response status: ${response.status}`);
|
|
57
62
|
}
|
|
58
|
-
|
|
63
|
+
// 空レスポンスの堅牢な処理
|
|
64
|
+
const text = await response.text();
|
|
65
|
+
if (!text || text.trim() === '') {
|
|
59
66
|
return undefined;
|
|
60
67
|
}
|
|
61
|
-
return
|
|
68
|
+
return JSON.parse(text);
|
|
62
69
|
},
|
|
63
70
|
};
|